upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authormilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 16:36:12 -0600
committermilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 16:36:19 -0600
commitfd0a5390753c24c92428b6beadd41b704a93cbb1 (patch)
tree3200d3de2cfe840d4f04286e4caf917312520470 /runtime/src/main.cpp
parent89d7dfcf5fc36a5badb6a87f422fd66208c73588 (diff)
tests: the CI registration scan counts the tests a TestCase inherits from a class of its module (TEST-CI-REG-LOCAL-MIXIN)
tests/test_ci_registration.py fails on main since 540d5111f (the merge of #930) and passes on its parent: test_every_selected_file_exposes_a_test_to_its_runner reports tests/semantic/test_sub_co_same_operand.py as a file the semantic job collects nothing from. `python -m unittest discover -s tests/semantic -p test_sub_co_same_operand.py` runs 6 tests there. Its three TestCase classes have no test method of their own: they take them from a mixin class defined in the same file, one TestCase per wave size. defines_a_test looked at a TestCase's own body and at a base imported from another module, not at a base defined in the module. It now also counts the test* methods of the classes of the module a TestCase derives from, directly or through other classes of the module, and an imported base reached that way. unittest's loader lists a class's tests with dir(), so these are the tests it runs. The new test writes eight small modules, runs unittest discover on them once and holds the scan to what the runner collected: a mixin above the TestCase, two classes up, beside a TestCase base without tests, an imported mixin named directly and through a local class (a test each), and a base without tests, a mixin no TestCase derives from and a mixin without a TestCase (none). With main's defines_a_test put back, four of the five cases with a test fail, and so does the repository check. Over the repository at 51a6074d2: the scan lists the same 997 test files; of the 473 the semantic job selects, main's scan found a test in 472 and this one in 473, and test_sub_co_same_operand.py is the only file the two disagree on (none of the pytest job's 36). unittest's loader collects tests from all 473 (6191 tests, no import failure), so main's scan disagreed with the runner on that one file and this one on none. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions