fix: load the pack modules above 3.8 in tests

The packs imports moved to module level in test_install_selection and
test_install_tui. They pull core.cli, which stops below Python 3.9, so
the 3.8 screen test step exited at import.
This commit is contained in:
Abdessamad Derraz committed 2026-11-18 18:56:46 +01:00
1 parent 825c527d11
commit d50dfc36e2
2 files changed
+11 -8

No files matched your search

+6 -4
View File
@@ -28,16 +28,18 @@ import sys
import tempfile
import threading
import unittest
from packs import archive
from packs import manifest as packs_manifest
from packs import platformpack
from packs import coverage
from unittest import mock
from pathlib import Path
from model import region
from resolve import regions as resolve_regions
# The screen tests run under 3.8 and import this module for its fakes. The
# pack builder stops below 3.9, so its modules load only above that floor.
if sys.version_info >= (3, 9):
from packs import archive, coverage, platformpack
from packs import manifest as packs_manifest
REPO_ROOT = Path(__file__).resolve().parent.parent
_spec = importlib.util.spec_from_file_location("install", REPO_ROOT / "install.py")