mirror of https://github.com/python/cpython
Issue #23630: Fix test_asyncio on Windows
The proactor event loop requires also to mock loop._stop_serving.
This commit is contained in:
parent
72e1eae7bb
commit
582b17c2c5
|
@ -764,6 +764,7 @@ class EventLoopTestsMixin:
|
|||
for host in hosts]
|
||||
self.loop.getaddrinfo = getaddrinfo_task
|
||||
self.loop._start_serving = mock.Mock()
|
||||
self.loop._stop_serving = mock.Mock()
|
||||
f = self.loop.create_server(lambda: MyProto(self.loop), hosts, 80)
|
||||
server = self.loop.run_until_complete(f)
|
||||
self.addCleanup(server.close)
|
||||
|
|
Loading…
Reference in New Issue