summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-01-07 22:55:57 (GMT)
committerGitHub <noreply@github.com>2019-01-07 22:55:57 (GMT)
commitdf8e1fb4e388e18430a9be8c6ceeb03c330f166c (patch)
treec2b694770e287e993702cc69731ae10fcc60f768 /Lib
parent2d53bed79c1953390f85b191c72855e457e09305 (diff)
downloadcpython-df8e1fb4e388e18430a9be8c6ceeb03c330f166c.zip
cpython-df8e1fb4e388e18430a9be8c6ceeb03c330f166c.tar.gz
cpython-df8e1fb4e388e18430a9be8c6ceeb03c330f166c.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_asyncio/test_sendfile.py4
1 files changed, 4 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):