Skip to content

test: let the browser fixture close the floating-box and gate tests' pages - #5216

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5172
Nov 3, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5172

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The nightly guard test_the_resources_a_fixture_owns_are_taken_from_that_fixture failed because two tests closed a page they took from the browser fixture: the floating-box journey (added in #5054), and test_a_frame_of_another_live_leaf_page_is_checked_on_its_own in tests/browser/test_render_gate.py (added in #5035; it fails the guard on current main too). The fixture closes every context it lent at teardown, after judge_watches reads each page that is still open. Closing early skipped that reading for every Hypothesis example of the journey. Both tests now leave their pages for the fixture to close, and neither test's assertions change.

Verified locally: the guard failed on main naming both files and passes now. The gate test passes. tests/journeys/test_floating_box_motion.py passes on Chromium and Firefox with every example's page left open until teardown (22 per engine, about 100 s, peak resident memory of the largest single process 1.9 GB).

Closes #5172 — automated triage

…xture to close

Both tests closed a page they had taken from the `browser` fixture in a
`finally` block. The fixture closes every context it lent at teardown,
after judging each live page's watches (`render_harness.judge_watches`
skips a closed page), so an early close skipped that judgement for
every Hypothesis example of the floating-box journey.
`test_the_resources_a_fixture_owns_are_taken_from_that_fixture` flags
both. The pages now stay open until the fixture's teardown; the
journey's examples (22 per engine) all stay open and it passes on
Chromium and Firefox.

Closes #5172
@leaf-agent
leaf-agent merged commit dbe4b3c into main Nov 3, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5172 branch November 3, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Floating-box journey closes its fixture-owned page early

1 participant