Spaces:
Sleeping
Sleeping
File size: 982 Bytes
116524e | 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 29 30 31 32 | """Shared pytest fixtures for test suite."""
import pytest
@pytest.fixture(autouse=True)
def _suppress_opik(monkeypatch):
"""Disable Opik connections during tests to avoid connection noise."""
monkeypatch.setenv("OPIK_DISABLED", "true")
# Test markers configuration
pytest_configure_done = False
def pytest_configure(config):
"""Register custom markers."""
global pytest_configure_done
if not pytest_configure_done:
config.addinivalue_line(
"markers", "slow: marks tests as slow (deselect with '-m \"not slow\"')"
)
config.addinivalue_line(
"markers", "integration: marks tests as integration tests"
)
config.addinivalue_line("markers", "unit: marks tests as unit tests")
config.addinivalue_line(
"markers",
"requires_api: marks tests requiring external API keys (skipped in CI)",
)
pytest_configure_done = True
|