- Create pytest.ini with: - Test discovery configuration (testpaths, python_files) - Asyncio mode settings - Coverage configuration (>=90% requirement) - Custom markers (unit, integration, e2e, slow) - Update conftest.py with: - pytest_asyncio plugin - Shared fixtures (project_root, src_path, temp_dir, mock_env_vars) - Path configuration for imports - Add test_pytest_config.py with 12 unit tests - All tests passing (12/12) Refs: T05 Completes setup phase T01-T05
33 lines
725 B
INI
33 lines
725 B
INI
[pytest]
|
|
# Test discovery settings
|
|
testpaths = tests
|
|
python_files = test_*.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Asyncio settings
|
|
asyncio_mode = auto
|
|
asyncio_default_fixture_loop_scope = function
|
|
|
|
# Coverage settings
|
|
addopts =
|
|
-v
|
|
--strict-markers
|
|
--tb=short
|
|
--cov=src/openrouter_monitor
|
|
--cov-report=term-missing
|
|
--cov-report=html:htmlcov
|
|
--cov-fail-under=90
|
|
|
|
# Markers
|
|
testmarkers =
|
|
unit: Unit tests (no external dependencies)
|
|
integration: Integration tests (with mocked dependencies)
|
|
e2e: End-to-end tests (full workflow)
|
|
slow: Slow tests (skip in quick mode)
|
|
|
|
# Filter warnings
|
|
filterwarnings =
|
|
ignore::DeprecationWarning:passlib.*
|
|
ignore::UserWarning
|