| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- [pytest]
- # ============================================================================
- # Test Discovery
- # ============================================================================
- testpaths = tests
- python_files = test_*.py
- python_classes = Test*
- python_functions = test_*
- # ============================================================================
- # Async Support
- # ============================================================================
- asyncio_mode = auto
- asyncio_default_fixture_loop_scope = function
- # ============================================================================
- # Output Configuration
- # ============================================================================
- # Show extra test summary info for all test outcomes except passed
- addopts =
- -ra
- --strict-markers
- --strict-config
- --showlocals
- --tb=short
- -v
- # ============================================================================
- # Coverage Configuration
- # ============================================================================
- # Coverage options (used with pytest-cov)
- # Run with: pytest --cov=src --cov-report=html --cov-report=term
- [coverage:run]
- source = src
- omit =
- */tests/*
- */test_*.py
- */__pycache__/*
- */site-packages/*
- */conftest.py
- [coverage:report]
- # Fail if coverage is below 80%
- fail_under = 80
- precision = 2
- show_missing = True
- skip_covered = False
- exclude_lines =
- # Have to re-enable the standard pragma
- pragma: no cover
- # Don't complain about missing debug-only code
- def __repr__
- # Don't complain if tests don't hit defensive assertion code
- raise AssertionError
- raise NotImplementedError
- # Don't complain if non-runnable code isn't run
- if __name__ == .__main__.:
- # Don't complain about abstract methods
- @abstractmethod
- @abc.abstractmethod
- # Don't complain about type checking code
- if TYPE_CHECKING:
- # Don't complain about protocol methods
- \.\.\.
- [coverage:html]
- directory = htmlcov
- # ============================================================================
- # Test Markers
- # ============================================================================
- markers =
- unit: Unit tests that test individual components in isolation
- integration: Integration tests that test component interactions
- e2e: End-to-end tests that test complete user workflows
- slow: Tests that take a long time to run (> 1 second)
- requires_db: Tests that require a database connection
- requires_vector_db: Tests that require a vector database connection
- requires_external_service: Tests that require external services
- property: Property-based tests using Hypothesis
- asyncio: Async tests using pytest-asyncio
- # ============================================================================
- # Logging Configuration
- # ============================================================================
- log_cli = false
- log_cli_level = INFO
- log_cli_format = %(asctime)s [%(levelname)8s] %(message)s
- log_cli_date_format = %Y-%m-%d %H:%M:%S
- log_file = tests/logs/pytest.log
- log_file_level = DEBUG
- log_file_format = %(asctime)s [%(levelname)8s] %(name)s - %(message)s
- log_file_date_format = %Y-%m-%d %H:%M:%S
- # ============================================================================
- # Warning Configuration
- # ============================================================================
- filterwarnings =
- error
- # Ignore specific warnings from third-party libraries
- ignore::DeprecationWarning:pkg_resources
- ignore::PendingDeprecationWarning
- # Ignore warnings from hypothesis
- ignore::hypothesis.errors.NonInteractiveExampleWarning
- # ============================================================================
- # Timeout Configuration
- # ============================================================================
- # Uncomment to enable test timeouts (requires pytest-timeout)
- # timeout = 300
- # timeout_method = thread
- # ============================================================================
- # Parallel Execution
- # ============================================================================
- # Uncomment to enable parallel test execution (requires pytest-xdist)
- # addopts = -n auto
- # ============================================================================
- # Test Selection
- # ============================================================================
- # Minimum Python version required
- minversion = 3.11
- # ============================================================================
- # Doctest Configuration
- # ============================================================================
- doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
- # ============================================================================
- # Console Output
- # ============================================================================
- console_output_style = progress
|