Skip to content

new check exit code - #221

Merged
skogsbaer merged 5 commits into
masterfrom
sw/check-exit-code
Oct 30, 2026
Merged

skogsbaer merged 5 commits into
masterfrom
sw/check-exit-code

Conversation

@skogsbaer

Copy link
Copy Markdown
Owner

No description provided.

skogsbaer and others added 5 commits October 26, 2026 18:05
runTestsInFile called runCode(testFile, ...) twice: once before the try
and once inside it. Every tutor check was counted twice, every failure
was printed twice, and an exception in the first call bypassed
handleCurrentException.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --check, both a crash while loading and failing checks ended with
exit code 1, so the Praktomat checker had to run WYPP a second time with
--check-runnable to tell them apart. Failing checks (student and tutor
checks together) now give exit code 3 (EXIT_CODE_FAILING_CHECKS in
utils.py; not 2, which argparse uses for usage errors). Exit code 1
stays for exceptions while loading the file or running the test file;
this now also holds with --interactive, where a crash while loading used
to give 0 if no check failed.

fileTestsLib.record() now honors exitCode from WYPP_TEST_CONFIG, as
check() already did, so file tests expecting exit code 3 can be recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skogsbaer
skogsbaer merged commit aaf1788 into master Oct 30, 2026
9 checks passed
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.

1 participant