Skip to content

Commit 7d52007

Browse files
committed
✅ Fix metadata Python env test
1 parent 0fd0453 commit 7d52007

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/functional/test_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest_mock
77
import tempfile
88
from simvue.config.user import SimvueConfiguration
9+
from simvue.exception import SimvueUserConfigError
910

1011

1112
@pytest.mark.config
@@ -100,7 +101,7 @@ def _mocked_find(file_names: list[str], *_, ppt_file=_ppt_file, conf_file=_confi
100101
import simvue.config.user
101102

102103
if not use_file and not use_env and not use_args:
103-
with pytest.raises(RuntimeError):
104+
with pytest.raises(SimvueUserConfigError):
104105
simvue.config.user.SimvueConfiguration.fetch(mode="online")
105106
return
106107
elif use_args:

tests/unit/test_metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def test_python_env(backend: str | None) -> None:
3030
else:
3131
metadata = sv_meta._python_env(pathlib.Path(__file__).parents[1].joinpath("example_data"))
3232

33-
assert re.findall(r"\d+\.\d+\.\d+", metadata["environment"]["numpy"])
33+
if backend:
34+
assert re.findall(r"\d+\.\d+\.\d+", metadata["environment"]["numpy"])
3435

3536

3637
@pytest.mark.metadata

0 commit comments

Comments
 (0)