Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: warnings in tests from IndySdkProfile #1865

Merged
merged 2 commits into from
Jul 19, 2022

Conversation

dbluhm
Copy link
Member

@dbluhm dbluhm commented Jul 19, 2022

This PR includes some minor tweaks to tests involving IndySdkProfiles to prevent them from emitting warnings. Based on my analysis, the warnings are a result of how the event loop is managed in asynchronous testing with pytest. The profile reference falls out of scope at the same time as the event loop is closed for a test and what results are Coroutine never awaited errors.

This may not be the best solution (open to thoughts) but in most cases, I simply monkeypatched the _make_finalizer call where the behavior of the finalizer was not what was under test. Where it was under test, I opted to manually call the finalizer before the end of the test (or as a part of fixture clean up) and, therefore, before the event loop starts to close.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@codecov-commenter
Copy link

Codecov Report

Merging #1865 (deffe04) into main (ad1cad3) will decrease coverage by 0.00%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main    #1865      +/-   ##
==========================================
- Coverage   93.72%   93.72%   -0.01%     
==========================================
  Files         536      536              
  Lines       34020    34025       +5     
==========================================
+ Hits        31886    31889       +3     
- Misses       2134     2136       +2     

@andrewwhitehead andrewwhitehead merged commit 73d091b into hyperledger:main Jul 19, 2022
@dbluhm dbluhm deleted the fix/indy-sdk-profile-tests branch July 19, 2022 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants