diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/windows_events.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_streams.py | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index fdde8e9..772ddf4 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -811,4 +811,4 @@ class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy): _loop_factory = ProactorEventLoop -DefaultEventLoopPolicy = WindowsSelectorEventLoopPolicy +DefaultEventLoopPolicy = WindowsProactorEventLoopPolicy 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 |