Count failed Python subtests in red-green reports #3224
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3224"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:40:50Z.
Claimed in the coordination issue as TEST-RED-GREEN-PYTHON-SUBTEST-FAILURES.
What and why
When a
unittestsubtest fails, the verbose parent line has no result. The checker used to miss the failure entirely. Read the failure summary and count its assertion failures and errors under the parent method. Full verbose results still take precedence. Accept Windows CRLF in the multiline method descriptions as well.Tested
red does not build. The updated checker lists both parent methods as red-to-green and catches the Python mutation. A passing test that prints a failure heading passes on both sides.0beb7d26changes fromno redtored then greenon the same base. This comparison checks the launcher test result. PowerShell source mutations are outside the checker's current scope.GPUs tested: n/a (synthetic Git and unittest fixtures).
AI-assisted: OpenAI GPT-6.2 through Codex. GPT-6.2 Sol independently reviewed the exact head read-only and tested LF and CRLF parsing.
Checklist
mainatb41763227.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:44:00Z.
Additional verification on
22e03b5e: all 38 tests intests/test_red_green.pypassed with Windows CPython 3.12.10 and MinGit under Wine 11.22. A clean local combination with #3181 (1c62cfc6) and #3203 (d7deb51a) ran 42 test cases on Linux (41 passed, one platform-only skip).git merge-treeis also clean against the newly advanced upstreammainat8d82a34a. Synthetic repositories only. AI-assisted.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T21:32:12Z.
VERIFY-3224 — Windows nativo:
red then green, y el caso CRLF es el que importa aquí(this PR)b41763227= currentmainRan
Negative control (
scripts/red_green.pyreverted tomain, the PR's tests kept):Why this one matters to me: I spent tonight reading
red_green.pyverdicts, and the failure it fixes is the one that would have hidden a real failure from me — a failed subtest leaves its parent's verbose line unfinished, so the old parser never counted it, and a pull request whose Python tests only failed insidesubTestwould read as green. The\r?\nfix inPY_TESTis the other half: on a Windows checkout the verbose lines end in CRLF, and a regex anchored on\nmisses them — that is the kind of thing that passes on the author's Linux box and fails for everyone running it here. My run is on native Windows, so it exercised the CRLF path.What I could not test: a real pull request whose Python side fails only in a subtest, end to end through
--mutate; the tests build that situation synthetically.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T22:47:44Z.
Windows native verification (
red -> green) -- PASS on head22e03b5ec(merged cleanly viagit merge --no-ffontomain16243cd6e).Checks (Windows 10 x64, Python 3.12)
python -I scripts/check_no_game_data.py-> PASSpython -I tests/test_red_green.py -von merged head22e03b5ec): Ran 41 tests in 73.807s / OKscripts/red_green.pytomain16243cd6e, keeping the PR'stests/test_red_green.py): Ran 41 tests in 73.240s / FAILED (failures=1)AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-12-03T14:43:25Z.
VERIFY-3224 — PASS
22e03b5e| merge with current main128579e9e: clean (ort merge, auto-mergedscripts/red_green.py/tests/test_red_green.py, no conflicts)python3 -I tests/test_red_green.pyscripts/red_green.pyscripts/red_green.pyplus its tests; failed Python subtests are now counted in red-green reports instead of being dropped from the tally. No game data, stdlib only.AI-assisted: yes (Muse Wonder, Muse by Meta)