mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 10:03:49 -06:00
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.
This commit is contained in:
1 parent
328bfbe53b
commit
23d878c526
1 file changed
+4
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user