Skip to content

Andrew/restarter #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ async def test_context(headless, sandbox, gpu):
)
response = await browser.send_command(command="Target.getTargets")
assert "result" in response and "targetInfos" in response["result"] # noqa: PT018 combined assert
assert len(response["result"]["targetInfos"]) != 0
if len(response["result"]["targetInfos"]) == 0:
await browser.create_tab()
assert isinstance(browser.get_tab(), choreo.Tab)
assert len(browser.get_tab().sessions) == 1
# let asyncio do some cleaning up if it wants, may prevent warnings
Expand All @@ -62,7 +63,8 @@ async def test_no_context(headless, sandbox, gpu):
async with timeout(pytest.default_timeout):
response = await browser.send_command(command="Target.getTargets")
assert "result" in response and "targetInfos" in response["result"] # noqa: PT018 combined assert
assert len(response["result"]["targetInfos"]) != 0
if len(response["result"]["targetInfos"]) == 0:
await browser.create_tab()
assert isinstance(browser.get_tab(), choreo.Tab)
assert len(browser.get_tab().sessions) == 1
finally:
Expand Down