fix: test_config_loads_defaults — remove reload() that undid CONFIG_PATH patch
This commit is contained in:
@@ -6,9 +6,8 @@ from unittest.mock import patch
|
|||||||
def test_config_loads_defaults():
|
def test_config_loads_defaults():
|
||||||
with tempfile.TemporaryDirectory() as tmpdir:
|
with tempfile.TemporaryDirectory() as tmpdir:
|
||||||
cfg_path = os.path.join(tmpdir, "config.toml")
|
cfg_path = os.path.join(tmpdir, "config.toml")
|
||||||
|
import config
|
||||||
with patch("config.CONFIG_PATH", cfg_path):
|
with patch("config.CONFIG_PATH", cfg_path):
|
||||||
import importlib, config
|
|
||||||
importlib.reload(config)
|
|
||||||
cfg = config.load()
|
cfg = config.load()
|
||||||
assert cfg["ollama"]["model"] == "gemma3:12b"
|
assert cfg["ollama"]["model"] == "gemma3:12b"
|
||||||
assert cfg["whisper"]["model"] == "large-v3"
|
assert cfg["whisper"]["model"] == "large-v3"
|
||||||
|
|||||||
Reference in New Issue
Block a user