File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ def pytest_addoption(parser) -> None:
20
20
21
21
@pytest .fixture
22
22
async def display (backend , browser ):
23
- if sys .platform == "win32" :
24
- asyncio .set_event_loop_policy (asyncio .WindowsProactorEventLoopPolicy ())
25
23
async with DisplayFixture (backend , browser ) as display_fixture :
26
24
display_fixture .page .set_default_timeout (10000 )
27
25
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
37
yield await pw .chromium .launch (headless = True if GITHUB_ACTIONS else pytestconfig .getoption ("headless" ))
38
+
39
+
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 ()
You can’t perform that action at this time.
0 commit comments