[pytest]
# Test discovery patterns
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Output options
addopts =
-v
--tb=short
--strict-markers
--color=yes
--cov=openscad_mcp
--cov-report=term-missing
--cov-report=html
--cov-report=xml
--cov-fail-under=80
--maxfail=5
--durations=10
-p no:warnings
# Marker definitions
markers =
unit: Unit tests - fast, isolated tests with mocks
integration: Integration tests - tests with real components
performance: Performance tests - benchmark and speed tests
slow: Slow running tests - tests that take > 1 second
asyncio: Asynchronous tests using asyncio
edge: Edge case tests - unusual inputs and boundary conditions
smoke: Smoke tests - basic functionality verification
regression: Regression tests - prevent previously fixed bugs
# Asyncio configuration
asyncio_mode = auto
# Coverage options
[coverage:run]
source = openscad_mcp
omit =
*/tests/*
*/test_*.py
*/__init__.py
*/conftest.py
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
@abstractmethod
[coverage:html]
directory = coverage_html_report
# Timeout configuration (requires pytest-timeout)
timeout = 30
timeout_method = thread
# Test order (requires pytest-ordering)
# Run unit tests first, then integration, then slow tests
ordering = unit,integration,performance,slow
# Parallel execution (requires pytest-xdist)
# Uncomment to enable parallel test execution
# addopts = -n auto
# Logging configuration
log_cli = true
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.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
# Disable unnecessary plugins
[pytest:disable]
plugins =
pytest_cov
pytest_timeout
pytest_asyncio