Spaces:
Build error
Build error
File size: 639 Bytes
8c3e275 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # 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"
|