diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-09-25 15:27:08 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-09-25 15:27:08 (GMT) |
commit | 6ea29c5e90dde6c240bd8e0815614b52ac307ea1 (patch) | |
tree | b13f44020dc742f6d06d8adb71961b734b06c2ea /Lib/test | |
parent | c8c0249c9e8f61ab7670119a5a5278354df27bbb (diff) | |
download | cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.zip cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.tar.gz cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.tar.bz2 |
bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_streams.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index fe3c383..95f4f6b 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -1014,7 +1014,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): def setUp(self): super().setUp() - self.loop = asyncio.new_event_loop() + self.loop = asyncio.SelectorEventLoop() self.set_event_loop(self.loop) @mock.patch('socket.getnameinfo') diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py index d8e3715..c529e52 100644 --- a/Lib/test/test_asyncio/test_streams.py +++ b/Lib/test/test_asyncio/test_streams.py @@ -816,7 +816,8 @@ os.close(fd) addr = q.get() # Should not be stuck in an infinite loop. - with self.assertRaises((ConnectionResetError, BrokenPipeError)): + with self.assertRaises((ConnectionResetError, ConnectionAbortedError, + BrokenPipeError)): self.loop.run_until_complete(client(*addr)) # Clean up the thread. (Only on success; on failure, it may |