From 18cca66e58edb20d4d5708eb95176137a8f32cf1 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Mon, 19 Oct 2026 04:23:26 +0200 Subject: [PATCH] fix: hold the empty sweep to the no-pack rule The older test read an --all check of an empty directory as a pass; it checked nothing, which the verify-packs rule now refuses. --- tests/test_audit_regressions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 46239c32..f813c88b 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -2458,13 +2458,15 @@ class ACheckThatCannotAnswerDoesNotPass(unittest.TestCase): "a named platform with no pack reported success:\n" + named.stdout + named.stderr, ) - # --all is a sweep: a platform nobody built is out of scope. + # --all is a sweep: a platform nobody built is out of scope and + # skipped, but a sweep that found no pack at all checked nothing. swept = subprocess.run( [sys.executable, "scripts/generate_pack.py", "--all", "--verify-packs", "--output-dir", directory], capture_output=True, text=True, cwd=str(ROOT), timeout=300, ) - self.assertEqual(swept.returncode, 0, swept.stdout + swept.stderr) + self.assertIn("SKIP (no pack in", swept.stdout) + self.assertNotEqual(swept.returncode, 0, swept.stdout + swept.stderr) def test_an_unsatisfiable_declared_path_is_reported(self): from scripts.restore_large_files import restore