From 38581b98be6a73994e6e4c84c84b1be36759a57e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:33:35 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20repo?= =?UTF-8?q?=20check=20holds=20the=20README's=20pytest=20pins=20too,=20and?= =?UTF-8?q?=20run-tests'=20comment=20names=20it=20instead=20of=20counting?= =?UTF-8?q?=20copies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/repo_checks/test_task_bench_image.py | 4 ++++ bin/run_tests/main.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/repo_checks/test_task_bench_image.py b/bin/repo_checks/test_task_bench_image.py index 19f750f2..07cadb6d 100644 --- a/bin/repo_checks/test_task_bench_image.py +++ b/bin/repo_checks/test_task_bench_image.py @@ -22,3 +22,7 @@ class TaskBenchImage(unittest.TestCase): installed = set(re.findall(r"\b(pytest(?:-xdist)?==[\d.]+)", DOCKERFILE)) pins = {word for word in PYTEST if re.fullmatch(r"pytest(?:-xdist)?==[\d.]+", word)} self.assertEqual(installed, pins) + + def test_each_pytest_pin_in_the_readme_is_the_one_run_tests_uses(self): + pinned = {word for word in PYTEST if re.fullmatch(r"pytest==[\d.]+", word)} + self.assertEqual(set(re.findall(r"\bpytest==[\d.]+", (ROOT / "README.md").read_text(encoding="utf-8"))), pinned) diff --git a/bin/run_tests/main.py b/bin/run_tests/main.py index c19420ff..b60a5271 100644 --- a/bin/run_tests/main.py +++ b/bin/run_tests/main.py @@ -22,7 +22,7 @@ import typing from machine_load.slots import CPUS_PER_SLOT BIN = pathlib.Path(__file__).resolve().parents[1] -# ci.sh runs this command, so its pins live here; README.md → Test's mutation command and task-bench-image/Dockerfile repeat the pytest pins, so change all three. The workers fill one heavy slot, since run-heavy grants one. +# ci.sh runs this command, so its pins live here; README.md → Test's mutation and bench commands and task-bench-image/Dockerfile repeat the pytest pins, and bin/repo_checks/test_task_bench_image.py fails where one differs. The workers fill one heavy slot, since run-heavy grants one. PYTEST = ["uvx", "--python", shutil.which("python3") or sys.executable, "--with", "pytest-xdist==3.8.0", "pytest==9.2.0", "-n", str(CPUS_PER_SLOT)] SECTION = re.compile(r"^=+ (.+) =+$") TEST_HEADER = re.compile(r"^_+ .+ _+$")