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 155079b commit c7d19f6Copy full SHA for c7d19f6
tests/conftest.py
@@ -20,8 +20,6 @@ def pytest_addoption(parser) -> None:
20
21
@pytest.fixture
22
async def display(backend, browser):
23
- if sys.platform == "win32":
24
- asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
25
async with DisplayFixture(backend, browser) as display_fixture:
26
display_fixture.page.set_default_timeout(10000)
27
yield display_fixture
@@ -37,3 +35,10 @@ async def backend():
37
35
async def browser(pytestconfig):
38
36
async with async_playwright() as pw:
39
yield await pw.chromium.launch(headless=True if GITHUB_ACTIONS else pytestconfig.getoption("headless"))
+
40
+@pytest.fixture
41
+def event_loop_policy(request):
42
+ if sys.platform == "win32":
43
+ return asyncio.WindowsProactorEventLoopPolicy()
44
+ return asyncio.get_event_loop_policy()
0 commit comments