Skip to content

Commit 98ec964

Browse files
committed
test: Close event_loop in test_event_loop_scope/test_4 to avoid side-effects on other tests.
Signed-off-by: Michael Seifert <[email protected]>
1 parent 18094a8 commit 98ec964

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_event_loop_scope.py

+3
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ def test_3():
3434
def test_4(event_loop):
3535
# If a test sets the loop to None -- pytest_fixture_post_finalizer()
3636
# still should work
37+
38+
# Close to avoid ResourceWarning about unclosed socket as a side effect
39+
event_loop.close()
3740
asyncio.get_event_loop_policy().set_event_loop(None)

0 commit comments

Comments
 (0)