From 6d7f81d010a392298408cff92e0e8779c8afc19d Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 21 Nov 2026 11:18:25 +0100 Subject: [PATCH] fix: hold the 3.8 screen tests off build modules The 3.8 run of tests.test_install_tui failed on 9ffbedbb1: installer_build now caches with functools.cache, and test_install_offline imports packs.parts, which reaches the core.cli floor exit. The card marker test skips below 3.9 like the other build-script tests, and packs.parts loads only above that floor. --- pyproject.toml | 1 + tests/test_install_offline.py | 7 ++++++- tests/test_install_tui.py | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 103074c95..5bdbf7a04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,5 +114,6 @@ max-returns = 10 "tests/test_install_tui.py" = ["UP"] "tests/test_install_app.py" = ["UP"] "tests/test_install_selection.py" = ["UP"] +"tests/test_install_offline.py" = ["UP"] # Shell fixtures inside string literals keep the tabs the real files have. "tests/test_launchers_*.py" = ["E101"] diff --git a/tests/test_install_offline.py b/tests/test_install_offline.py index effaea5a9..ba4ad020d 100644 --- a/tests/test_install_offline.py +++ b/tests/test_install_offline.py @@ -28,9 +28,14 @@ import zipfile from pathlib import Path import install -from packs import parts as packs_parts from tests.test_install_selection import FakeRepository +# The screen tests run under 3.8 and import this module for its payloads. The +# build scripts stop below 3.9 (core.cli), so their modules load only above +# that floor. +if sys.version_info >= (3, 9): + from packs import parts as packs_parts + REPO_ROOT = Path(__file__).resolve().parent.parent US = b"us bios " * 64 diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index b78221c42..da4b79ddb 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -10634,6 +10634,8 @@ class CardNamesAndHelp(_CardFixtures, unittest.TestCase): self.assertIn("E:\\", title) self.assertNotIn("/mnt/e", title) + @unittest.skipIf(sys.version_info < BUILDER_FLOOR, + "the installer doc generator needs Python 3.9") def test_the_card_marker_table_is_written_from_the_rules(self): """The table left out the SHARE drives. It is generated: every card rule and SHARE drive file