← Files LogForgeARCHIVED FILE

tests/conftest.py

441 Bytes · Nov 9, 2026 · 01:16 UTC

↓ Download file

import sys
import pytest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / "sdk/python"))
sys.path.insert(0, str(ROOT / "scripts"))


@pytest.fixture(autouse=True)
def isolate_publisher_usage(tmp_path, monkeypatch):
    # Running packaged tests must never alter the user's real usage preferences or metrics.
    monkeypatch.setenv("LOGFORGE_USAGE_STATE", str(tmp_path / "test-usage.sqlite3"))

SHA-256: 945527c302f37b42767d783c83e4073dde7b587fd198072a6f8c0b8555eb58f7