Repository navigation
fix(testing): let the exit-code gate see fail() helpers and tuple returns - #426
Merged
Merged
Conversation
…urns
check_exit_code_readme.py resolved only `return N`, `sys.exit(N)` and
named constants, but most showcase checks return `fail("...", N)` and
many return tuples (`return 9, objs, objs`, `return (fail(...),) +
none3`). Deleting README rows 15-18 from shipping-crate passed the gate.
A module function whose every return hands back one of its own
parameters is now a pass-through helper, so `fail(msg, 15)` resolves to
15 (positional or keyword), and a tuple return resolves through its
first element. Distinct codes the gate guards across scripts: 559 ->
2031. No current README drift surfaced. tests/test_exit_code_readme.py
pins each shape and runs in Validate.
Closes #360
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 143 passed, 1 skipped, 0 failed;142 passed, 0 skipped, 0 failed;141 passed, 3 skipped, 0 failed;136 passed, 6 skipped, 0 failed; |
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.
Closes #360.
Problem
tests/check_exit_code_readme.pyresolved onlyreturn N,sys.exit(N)and named constants. Most showcase checks are written asreturn fail("...", N), and many return tuples, so most codes went unguarded.Change
returnhands back one of its own parameters (def fail(msg, code): …; return code) is treated as a pass-through.fail(msg, 15)andfail(msg, code=15)resolve to 15.return 9, objs, objs,return fail(…), None, …andreturn (fail(…, 11),) + none3.tests/test_exit_code_readme.py(4 cases), added to Validate.Evidence (local, no Blender)
shipping_crate.pycopied with its README rows 15–18 deleted.exit-code README checks passed.return/exit 15|16|17|18 is not in the … exit table(4 errors).test_exit_code_readme.py: 4/4 OK.🤖 Generated with Claude Code