bpo-32710: test_asyncio: test_sendfile reset policy (GH-11461) · python/cpython@df8e1fb (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit df8e1fb

test_asyncio/test_sendfile.py now resets the event loop policy using tearDownModule() as done in other tests, to prevent a warning when running tests on Windows.

File tree

2 files changed

lines changed

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -18,6 +18,10 @@
18 18 ssl = None
19 19
20 20
21 +def tearDownModule():
22 +asyncio.set_event_loop_policy(None)
23 +
24 +
21 25 class MySendfileProto(asyncio.Protocol):
22 26
23 27 def __init__(self, loop=None, close_after=0):
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1 +``test_asyncio/test_sendfile.py`` now resets the event loop policy using
2 +:func:`tearDownModule` as done in other tests, to prevent a warning when
3 +running tests on Windows.