refactor: move generate_pack runs into packs

This commit is contained in:
Abdessamad Derraz committed 2026-11-21 14:58:17 +01:00
1 parent c58f3e624e
commit a1b8a10cf9
13 files changed
+866 -788

No files matched your search

+4 -1
View File
@@ -68,6 +68,7 @@ class AMistypedTargetIsRefusedFirst(unittest.TestCase):
from unittest import mock
import generate_pack
from packs import platformrun
def touched(*_a, **_kw):
raise AssertionError("lock or refresh taken before the target check")
@@ -76,8 +77,10 @@ class AMistypedTargetIsRefusedFirst(unittest.TestCase):
"--output-dir", str(REPO_ROOT / "tmp" / "never-written")]
err = io.StringIO()
with mock.patch.object(sys, "argv", argv), \
mock.patch.object(generate_pack, "_pack_output_lock", touched), \
mock.patch.object(generate_pack, "pack_output_lock", touched), \
mock.patch.object(generate_pack, "hold_data_dirs", touched), \
mock.patch.object(platformrun, "pack_output_lock", touched), \
mock.patch.object(platformrun, "hold_data_dirs", touched), \
contextlib.redirect_stdout(io.StringIO()), \
contextlib.redirect_stderr(err), \
self.assertRaises(SystemExit) as ctx: