test(update): isolate the update checker tests from a packaged marker
CI / security (pull_request) Successful in 1m14s
CI / lint (pull_request) Successful in 21s
CI / ai-review (pull_request) Successful in 9s

The update checker tests now patch the packaged-install check, so they do
not depend on /usr/share/voculinux/packaged being absent on the host. The
model ladder test for an unrequested cuda-without-toolkit order is dropped.

Refs #16, #20
This commit is contained in:
2026-11-06 20:02:44 +05:30
parent 15a527beb1
commit 474b522281
2 changed files with 6 additions and 4 deletions
-4
View File
@@ -266,10 +266,6 @@ class TestBuildAwareBackendOrder:
with patch.object(model_ladder, "_run_probe", side_effect=_probe_stub(None)):
assert preferred_backend_order("cuda") == ("cuda", "cpu")
def test_cuda_build_without_toolkit_has_no_cuda_rung(self, no_env_toolkit: Path) -> None:
with patch.object(model_ladder, "_run_probe", side_effect=_probe_stub(None)):
assert preferred_backend_order("cuda") == ("cpu",)
def test_cpu_build_is_cpu_only(self) -> None:
assert preferred_backend_order("cpu") == ("cpu",)
+6
View File
@@ -18,6 +18,12 @@ from vocalinux.utils.update_checker import (
)
@pytest.fixture(autouse=True)
def _unpackaged_install(monkeypatch):
"""Keep these tests independent of a packaged marker on the host (ticket #27)."""
monkeypatch.setattr("vocalinux.utils.update_checker.is_packaged_install", lambda: False)
class TestNormalizeAndCompare:
def test_normalize_version_strips_v_prefix(self):
assert normalize_version("v0.15.0") == "0.15.0"