refactor: read pack counts in one branch

Also gives the platform typo test a scratch directory it removes.
This commit is contained in:
Abdessamad Derraz committed 2026-10-17 12:32:20 +02:00
1 parent b6331a765a
commit 9980a694e4
2 files changed
+6 -11

No files matched your search

+3 -2
View File
@@ -95,8 +95,9 @@ class AMistypedPlatformIsNamed(unittest.TestCase):
ran its whole build first and then said "no pack for batocra"."""
def test_every_cli_names_the_platform_it_meant(self):
out = Path(tempfile.mkdtemp(dir=REPO_ROOT / "tmp"))
out.rmdir()
scratch = tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp")
self.addCleanup(scratch.cleanup)
out = Path(scratch.name) / "packs"
for script, extra in (("verify.py", []), ("cross_reference.py", []),
("generate_pack.py", ["--offline", "--output-dir", str(out)])):
with self.subTest(script=script):