summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_asyncio/test_sendfile.py4
-rw-r--r--Misc/NEWS.d/next/Tests/2019-01-07-23-34-41.bpo-32710.Hzo1b8.rst3
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_sendfile.py b/Lib/test/test_asyncio/test_sendfile.py
index 26e44a3..f148fe2 100644
--- a/Lib/test/test_asyncio/test_sendfile.py
+++ b/Lib/test/test_asyncio/test_sendfile.py
@@ -18,6 +18,10 @@ except ImportError:
ssl = None
+def tearDownModule():
+ asyncio.set_event_loop_policy(None)
+
+
class MySendfileProto(asyncio.Protocol):
def __init__(self, loop=None, close_after=0):
diff --git a/Misc/NEWS.d/next/Tests/2019-01-07-23-34-41.bpo-32710.Hzo1b8.rst b/Misc/NEWS.d/next/Tests/2019-01-07-23-34-41.bpo-32710.Hzo1b8.rst
new file mode 100644
index 0000000..dd602a9
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-01-07-23-34-41.bpo-32710.Hzo1b8.rst
@@ -0,0 +1,3 @@
+``test_asyncio/test_sendfile.py`` now resets the event loop policy using
+:func:`tearDownModule` as done in other tests, to prevent a warning when
+running tests on Windows.