diff --git a/scripts/devtools/prchecks.py b/scripts/devtools/prchecks.py index 0dd3b455d..6dc6e7ddb 100644 --- a/scripts/devtools/prchecks.py +++ b/scripts/devtools/prchecks.py @@ -23,13 +23,10 @@ class Step: may_fail: bool = False -# The full-screen tests, run again on the installer's Python floor. -TUI_MODULES = ( - "tests.test_tui_card_counts", "tests.test_tui_card_setups", "tests.test_tui_card_space", - "tests.test_tui_choices", "tests.test_tui_devices", "tests.test_tui_flow", - "tests.test_tui_folders", "tests.test_tui_line_mode", "tests.test_tui_mouse", - "tests.test_tui_packs", "tests.test_tui_pty", "tests.test_tui_screens", - "tests.test_tui_terminal", "tests.test_tui_views", +# The full-screen tests, run again on the installer's Python floor: every +# module named test_tui_*. +TUI_MODULES = tuple( + f"tests.{path.stem}" for path in sorted((REPO_ROOT / "tests").glob("test_tui_*.py")) ) diff --git a/tests/test_contributing_text.py b/tests/test_contributing_text.py index a1cf0065b..2d9b21f70 100644 --- a/tests/test_contributing_text.py +++ b/tests/test_contributing_text.py @@ -284,6 +284,17 @@ class OneCommandRunsTheChecks(unittest.TestCase): with self.subTest(step=step.command): self.assertIn(step.command, section) + def test_ci_runs_every_full_screen_module_on_the_floor(self): + """The 3.8 list was written twice, in validate.yml and in + pr_checks.py, and a new test_tui_ module reached neither.""" + from devtools import prchecks + + workflow = (REPO_ROOT / ".github" / "workflows" / "validate.yml").read_text(encoding="utf-8") + line = next(line for line in workflow.splitlines() if "run: python3.8 -m unittest" in line) + ran = tuple(word for word in line.split() if word.startswith("tests.")) + self.assertEqual(ran, prchecks.TUI_MODULES) + self.assertIn("tests.test_tui_pty", prchecks.TUI_MODULES) + def test_a_missing_tool_is_reported_and_a_failure_does_not_stop_the_run(self): import contextlib import io