diff options
| author | ddddddddwp <ddddddddwp@users.noreply.github.com> | 2026-11-24 16:02:00 +0800 |
|---|---|---|
| committer | ddddddddwp <ddddddddwp@users.noreply.github.com> | 2026-11-24 16:02:00 +0800 |
| commit | 66dac0d93870fe9a2d4d808b1d1c56a777468d5b (patch) | |
| tree | 2d71e19ffd1f365ab0a2d00d18ea7294793494b0 /runtime/src/thread_stacks.cpp | |
| parent | 1c93c8697078c3ccbd6f374caf5bb3ab0b6bc8e4 (diff) | |
run_semantic_tests: a package initializer runs once, and a run with no tests fails
`python -m unittest pkg.__init__` imports pkg and then executes the same file again as
pkg.__init__, so a registration in the initializer happens twice in the -j 2 worker while
discover imports it once. Hand unittest the package name instead; module_path() still
resolves the initializer, so the largest-file-first order is unchanged.
A suite whose only module is an empty package initializer reported "1 files, 0 tests, 0
files failed" and exit 0 in parallel mode, where -j 1 (discover) exits 5. A run where every
job ran no tests now prints "no tests ran" and exits 1; an empty initializer next to real
tests is still fine because those count.
Both new cases in tests/test_run_semantic_tests.py fail against the previous script.
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions