__init__.py 390 B

12345678
  1. import asyncio
  2. import sys
  3. # Use the selector event loop on windows. Do this in tornado/test/__init__.py
  4. # instead of runtests.py so it happens no matter how the test is run (such as
  5. # through editor integrations).
  6. if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy"):
  7. asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # type: ignore