test(update): isolate the update checker tests from a packaged marker
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:
@@ -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",)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user