Skip to content

Commit df8e1fb

Browse files
authored
bpo-32710: test_asyncio: test_sendfile reset policy (GH-11461)
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.
1 parent 2d53bed commit df8e1fb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Lib/test/test_asyncio/test_sendfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
ssl = None
1919

2020

21+
def tearDownModule():
22+
asyncio.set_event_loop_policy(None)
23+
24+
2125
class MySendfileProto(asyncio.Protocol):
2226

2327
def __init__(self, loop=None, close_after=0):
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)