We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08bc017 commit 277a4e9Copy full SHA for 277a4e9
testing/conftest.py
@@ -1 +1,20 @@
1
+import sys
2
+
3
+import pytest
4
5
6
pytest_plugins = "_pytest.pytester"
7
8
9
+@pytest.hookimpl(tryfirst=True)
10
+def pytest_configure(config):
11
+ if (
12
+ config.getoption("reactor") == 'asyncio'
13
+ and sys.platform == 'win32'
14
+ and sys.version_info >= (3, 8)
15
+ ):
16
+ # https://twistedmatrix.com/trac/ticket/9766
17
+ import asyncio
18
19
+ selector_policy = asyncio.WindowsSelectorEventLoopPolicy()
20
+ asyncio.set_event_loop_policy(selector_policy)
0 commit comments