diff --git a/scripts/tests/test_pr_changed_files.py b/scripts/tests/test_pr_changed_files.py index 1697b20bc..d3e42e1d9 100644 --- a/scripts/tests/test_pr_changed_files.py +++ b/scripts/tests/test_pr_changed_files.py @@ -3784,7 +3784,7 @@ def test_a_status_history_RUNNING_PAST_PAGE_1_is_PAGED_and_the_exemption_STANDS( def test_a_raced_verdict_on_PAGE_2_is_detected_and_repaired(tmp_path): """The hole #763 exists to close, and the half a paging change can still get wrong. -A verdict sits BEYOND the first page — 60 ordinary rows with it inserted at index 55 — so only a + A verdict sits BEYOND the first page — 60 ordinary rows with it inserted at index 55 — so only a walk that continues past page 1 can find it. Under the pre-#763 code the exemption would still have been repaired here, but for the wrong reason (rows merely EXISTED on page 2), which is why this test is paired with the one above rather than standing alone: together they separate @@ -4016,13 +4016,12 @@ def test_the_walk_does_not_request_a_SORT_order(tmp_path): # The REQUEST LINES ONLY — comments are excluded deliberately, because the withdrawal note inside # `page_statuses` names the parameter in order to explain why it is not used. A guard that reads # prose would fire on its own documentation. - requests = [l for l in src.splitlines() - if "statuses/$SHA?" in l and not l.lstrip().startswith("#")] + requests = [line for line in src.splitlines() if "statuses/$SHA?" in line and not line.lstrip().startswith("#")] assert requests, ( "no `/statuses/{sha}` request line found; the walk has been reshaped, so re-point this guard " "rather than letting the sort-order assertion below pass vacuously" ) - offenders = [l.strip() for l in requests if "sort=" in l] + offenders = [line.strip() for line in requests if "sort=" in line] assert not offenders, ( "the status-history request carries a sort order again. ASC ordering puts the OLDEST rows on " "page 1, which inverts the partial-mark fallback into a spurious sticky repair — the #761 " @@ -4112,11 +4111,8 @@ def test_a_MALFORMED_creator_row_does_not_kill_the_job_after_the_green_is_posted The fix type-tests `creator` before indexing it, so the malformed row is dropped from the count while the real verdict beside it is still counted and still repaired. """ - posted, r = _run_classify(tmp_path, _emitting("docs/a.md"), - history_mode="malformed-creator-beside-verdict") - assert r.returncode == 0, ( - f"the step died instead of skipping a malformed row: {r.stderr[-1200:]}" - ) + posted, r = _run_classify(tmp_path, _emitting("docs/a.md"), history_mode="malformed-creator-beside-verdict") + assert r.returncode == 0, f"the step died instead of skipping a malformed row: {r.stderr[-1200:]}" seq = _posted_sequence(tmp_path) assert len(seq) == 2, ( "a malformed `creator` row suppressed the repair, leaving the exemption green over the real " @@ -4137,7 +4133,7 @@ def test_a_MALFORMED_creator_row_does_not_kill_the_job_after_the_green_is_posted def test_a_verdict_BEYOND_A_SHORT_PAGE_is_still_found(tmp_path): - """"Terminate only on a validated EMPTY page, never on a short one" — the rule that is invisible + """ "Terminate only on a validated EMPTY page, never on a short one" — the rule that is invisible against a faithful double. On the real endpoint a short page IS the last page (measured: 50, 50, 14, `[]`), so an