| 1234567891011121314151617 |
- """Keep unit tests isolated from a developer's local model credentials."""
- import sys
- from pathlib import Path
- import pytest
- ROOT = Path(__file__).parents[1]
- SRC = ROOT / "src"
- if str(SRC) not in sys.path:
- sys.path.insert(0, str(SRC))
- @pytest.fixture(autouse=True)
- def isolate_local_llm_credentials(monkeypatch):
- monkeypatch.delenv("LONGCAT_API_KEY", raising=False)
- monkeypatch.setenv("ONTOREFACTOR_LLM_MODE", "auto")
|