-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
27 lines (21 loc) · 746 Bytes
/
Copy pathconftest.py
File metadata and controls
27 lines (21 loc) · 746 Bytes
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
"""Repository-wide pytest configuration."""
from __future__ import annotations
import pytest
def pytest_addoption(parser: pytest.Parser) -> None:
"""Register options used by repository-level test runs."""
parser.addoption(
"--save-baseline",
action="store_true",
default=False,
help="Write evaluation results to baseline_v1.0.json after the run.",
)
parser.addoption(
"--allow-drift",
action="store_true",
default=False,
help="Skip the eval golden SHA guard for local exploration.",
)
def pytest_configure(config: pytest.Config) -> None:
"""Configure repository-wide settings before tests run."""
import os
os.environ["KNOWCODE_TESTING"] = "1"