import os
import pytest
def pytest_configure(config): config.addinivalue_line(
"markers", "requires_model: mark test as requiring a GGUF model file"
)
@pytest.fixture
def model_path():
path = os.environ.get("OXILLAMA_TEST_MODEL")
if not path:
pytest.skip("OXILLAMA_TEST_MODEL not set")
if not os.path.isfile(path):
pytest.skip(f"Model file not found: {path}")
return path
@pytest.fixture(scope="session")
def native_module():
try:
import oxillama_py.oxillama_py as _m return _m
except ImportError:
pytest.skip("Native extension not built (run `maturin develop` first)")