From 23d878c52673eb9080320b2596117cca0919cd82 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 08:37:19 +0100 Subject: [PATCH] chore: stub the export cache check in a test test_a_targeted_export_reads_a_full_model runs pipeline.py --offline --with-export, which is now refused when .cache/upstream-native/ is empty, as in any fresh checkout. The test is about the truth directory the export reads. --- tests/test_audit_regressions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 5263d0c54..6776263b8 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -1140,9 +1140,12 @@ class PipelineRegressions(unittest.TestCase): argv = ["pipeline.py", "--offline", "--skip-packs", "--skip-docs", "--with-export", "--target", "switch"] + # The originals the offline export patches are not cached in a + # checkout: the run would be refused before any step. with mock.patch.object(sys, "argv", argv), mock.patch.object( pipeline, "run", side_effect=fake_run - ), contextlib.redirect_stdout(io.StringIO()), contextlib.suppress(SystemExit): + ), mock.patch.object(pipeline, "_refuse_offline_export_without_originals"), \ + contextlib.redirect_stdout(io.StringIO()), contextlib.suppress(SystemExit): pipeline.main() truth_runs = [c for c in commands if "scripts/generate_truth.py" in c] export = next(c for c in commands if "scripts/export_native.py" in c)