feat(setup): T05 configure pytest with coverage
- 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
This commit is contained in:
32
pytest.ini
Normal file
32
pytest.ini
Normal file
@@ -0,0 +1,32 @@
|
||||
[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
|
||||
Reference in New Issue
Block a user