pageparse.ai / tests /test_config.py
Varun2007's picture
initial clean deployment commit with compilers
8c3e275
Raw
History Blame Contribute Delete
639 Bytes
# SPDX-FileCopyrightText: 2026 Team Centurions
# SPDX-License-Identifier: AGPL-3.0-or-later
from pathlib import Path
from pageparse.config import Settings
def test_settings_defaults():
s = Settings()
assert s.airgap is False
assert s.slm_model == "llama3.2:1b"
def test_model_path():
s = Settings()
p = s.model_path("test.onnx")
assert p.name == "test.onnx"
assert p.parent == s.models_dir
def test_grammar_path(tmp_path: Path):
s = Settings()
s.grammars_dir = tmp_path
(tmp_path / "custom.gbnf").write_text("")
p = s.grammar_path("custom.gbnf")
assert p == tmp_path / "custom.gbnf"