You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spec test gate misses module-level skips and missing test_spec modules #203
Release blocker found by the external review of #183 (ChatGPT batch 25, C2).
tests/spec_gate.py:18-40 only marks test items that have already been collected (pytest_collection_modifyitems), and only turns their skipped pytest_runtest_makereport results into failures. Two cases get through:
Module-level skips:pytest.skip(..., allow_module_level=True) or pytest.importorskip(...) in a test_spec_*.py module runs during collection, before any item exists. The whole module is reported as skipped and the run still succeeds.
Deleted modules: a deleted test_spec_*.py module is not detected.
The self-test (tests/test_spec_gate.py:12-57) covers only skips that happen after a test item exists.
Fix: add a collection-report hook (pytest_collectreport) that fails on a skipped test_spec_* module. Add a session-level assertion that the expected Spec modules and items were actually collected. Add regression tests for a module-level skip, a module-level importorskip, and a missing module.
Activity