Skip to content

Commit

Permalink
fix windows async tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jan 24, 2025
1 parent f6baeed commit b69b270
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,5 +1062,10 @@ async def test_connect_options(page):
result.assert_outcomes(passed=1)
finally:
assert server_process
os.kill(server_process.pid, signal.SIGINT)
# TODO: Playwright CLI on Windows via Python does not forward the signal
# hence we need to send it to the whole process group.
if sys.platform == "win32":
subprocess.run(["taskkill", "/F", "/T", "/PID", str(server_process.pid)])
else:
os.kill(server_process.pid, signal.SIGINT)
server_process.wait()

0 comments on commit b69b270

Please sign in to comment.