mirror of https://github.com/MagicStack/uvloop.git
win/tests: Use IOCP asyncio loop on Windows
This commit is contained in:
parent
6d8636cbe8
commit
5bc48b3dfe
|
@ -306,7 +306,11 @@ class AIOTestCase(BaseTestCase):
|
|||
super().tearDown()
|
||||
|
||||
def new_loop(self):
|
||||
return asyncio.new_event_loop()
|
||||
if hasattr(asyncio, 'ProactorEventLoop'):
|
||||
# On Windows try to use IOCP event loop.
|
||||
return asyncio.ProactorEventLoop()
|
||||
else:
|
||||
return asyncio.new_event_loop()
|
||||
|
||||
|
||||
def has_IPv6():
|
||||
|
|
Loading…
Reference in New Issue