From 5cb79bb2f7c7c5e61445874e9b7d24c67e09220d Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 17 Oct 2026 20:31:09 +0200 Subject: [PATCH] fix: keep the test suite offline everywhere --- tests/__init__.py | 13 +++++++++++++ tests/test_audit_regressions.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..9edbc0fa 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,13 @@ +"""No test downloads a release asset unless it says so. + +The CI job sets RETROBIOS_OFFLINE; a local run of the documented command +did not, and e2e fixtures queried the large-files release and wrote its +answers into the shared .cache/large. A test that serves its own assets +clears the variable for itself. +""" + +from __future__ import annotations + +import os + +os.environ.setdefault("RETROBIOS_OFFLINE", "1") diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 8fceaf89..5eed1c0a 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -3367,5 +3367,11 @@ class EveryToolRefusesAFlagItWouldDrop(unittest.TestCase): self.assertEqual(proc.returncode, 2, proc.stdout + proc.stderr) + +class TestsRunOffline(unittest.TestCase): + def test_the_package_forbids_downloads(self): + self.assertTrue(os.environ.get("RETROBIOS_OFFLINE")) + + if __name__ == "__main__": unittest.main()