"""MWP6_00 — anti-skip gate: no wire-protocol flux skips remain in tests/. This test is the canary for the entire MWP-6 revival effort. It scans every .py file under tests/ and asserts that none contain the flux-skip marker that was mass-applied while the wire protocol was in flux. If this test is RED, a new skip was introduced or an old one was not removed. Fix the offending file — do not skip this test. """ from __future__ import annotations import pathlib import pytest pytestmark = pytest.mark.wire _TESTS_DIR = pathlib.Path(__file__).parent _FLUX_SKIP = 'pytest.mark.skip(reason="muse wire protocol in flux")' def test_no_flux_skips_remain() -> None: """No test file may contain the wire-protocol flux skip marker.""" this_file = pathlib.Path(__file__).name offenders: list[str] = [] for path in sorted(_TESTS_DIR.glob("*.py")): if path.name == this_file: continue if _FLUX_SKIP in path.read_text(): offenders.append(path.name) assert not offenders, ( "The following test files still contain the wire-protocol flux skip " "and must be revived or deleted with written justification:\n" + "\n".join(f" - {f}" for f in offenders) )