Repository navigation
test: let the browser fixture close the floating-box and gate tests' pages - #5216
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nightly guard
test_the_resources_a_fixture_owns_are_taken_from_that_fixturefailed because two tests closed a page they took from thebrowserfixture: the floating-box journey (added in #5054), andtest_a_frame_of_another_live_leaf_page_is_checked_on_its_ownintests/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, afterjudge_watchesreads 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.pypasses 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