Files
meshcore-bot/pytest.ini
T
Stacy Olivas d7cf0d5d2b fix: add per-test timeout to pytest.ini to prevent CI hangs
pytest.ini takes precedence over pyproject.toml [tool.pytest.ini_options]
so the timeout = 30 setting there was silently ignored. Add timeout = 30
and timeout_method = thread directly to pytest.ini so blocking tests are
killed after 30 s in CI.
2026-04-16 18:35:48 -07:00

38 lines
927 B
INI

[pytest]
# Pytest configuration for meshcore-bot tests
# Test discovery patterns
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
# Test paths
testpaths = tests
# Async test support
asyncio_mode = auto
# Per-test timeout — prevents blocking I/O or infinite loops from hanging CI.
# Tests that legitimately need longer can use @pytest.mark.timeout(N).
timeout = 30
timeout_method = thread
# Coverage configuration (optional)
# [tool:pytest]
# addopts = --cov=modules --cov-report=html --cov-report=term-missing
# Output options
addopts =
-v
--tb=short
--strict-markers
--cov=modules
--cov-report=term-missing
# Markers for test categorization
markers =
unit: Unit tests (isolated, with mocks)
integration: Integration tests (with real database)
slow: Slow running tests
mqtt: Live MQTT integration tests (require network access to letsmesh broker)