diff options
| author | Shang Li <144836394+Mby159@users.noreply.github.com> | 2026-11-25 01:18:48 +0800 |
|---|---|---|
| committer | Shang Li <144836394+Mby159@users.noreply.github.com> | 2026-11-25 01:18:48 +0800 |
| commit | f48c2b2a352394e835ae746024990970f1112c29 (patch) | |
| tree | 8910b2cee821987105cbcd48397f0793082c30a5 /runtime/src/thread_stacks.cpp | |
| parent | 7d184af582458bff84bfe6be65933d671891d993 (diff) | |
semantic tests: count from unittest's result object
The count came from a line of the shape "Ran N tests in ..." in the module's
stderr. unittest writes that summary after every test has run, but a module
can write a line of the same shape after it: an atexit handler that runs a
nested runner does exactly that, and the runner counted "Ran 0 tests", so a
module with one passing test looked empty and the run exited 1 with "no
tests ran".
The count is now taken from unittest's own result object. The child program
runs the module through unittest's program, the way "python -m unittest
<module>" does, writes the result to a file and exits with unittest's own
exit codes: 1 when a test failed, 5 when nothing ran at all, 0 otherwise.
Nothing the module writes can change the count any more.
Follow-up to @lixonik's review on #662, which asked for the count to come
from the result rather than from a line of the module's stderr. AI-assisted.
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions