node configs
This commit is contained in:
@@ -1414,3 +1414,16 @@ def test_layers_from_config_get_text_config_and_variants():
|
||||
cfg = types.SimpleNamespace(get_text_config=lambda: inner)
|
||||
assert layers_from_config(cfg) == 32
|
||||
assert layers_from_config(types.SimpleNamespace()) is None
|
||||
|
||||
|
||||
def test_download_dir_env_override(monkeypatch):
|
||||
import importlib
|
||||
|
||||
from meshnet_node import config as config_mod
|
||||
|
||||
monkeypatch.setenv("MESHNET_DOWNLOAD_DIR", "/tmp/llm-store")
|
||||
importlib.reload(config_mod)
|
||||
assert config_mod.DEFAULTS["download_dir"] == "/tmp/llm-store"
|
||||
monkeypatch.delenv("MESHNET_DOWNLOAD_DIR")
|
||||
importlib.reload(config_mod)
|
||||
assert config_mod.DEFAULTS["download_dir"].endswith("models")
|
||||
|
||||
Reference in New Issue
Block a user