-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.ini
More file actions
40 lines (35 loc) · 1.44 KB
/
Copy pathpytest.ini
File metadata and controls
40 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[pytest]
# Test configuration optimized for local stability
# - Parallel execution enabled with a conservative worker cap (-n 8), matching CI
# - Verbose output with short tracebacks
# - pytest-asyncio in auto mode
addopts = -v --strict-markers -p no:asyncio -p pytest_asyncio.plugin -n 8 --dist loadgroup --tb=short -m "not live_only"
# =============================================================================
# QUICK REFERENCE
# =============================================================================
# Default run (fast): pytest
# Single test: pytest tests/test_file.py::TestClass::test_method
# Pattern match: pytest -k "cache"
# With coverage: pytest --cov=accessiweather
# Disable parallel: pytest -n 0
# More verbose: pytest -vv
# =============================================================================
python_files = test_*.py
python_classes = Test*
python_functions = test_*
testpaths = tests
# src for the app package, repo root so tests can import scripts/*
pythonpath = src .
cache_dir = .tmp/pytest_cache
# Async mode for pytest-asyncio
asyncio_mode = auto
# Markers
markers =
unit: Unit tests (fast, mocked dependencies)
integration: Integration tests (may use network)
live_only: Tests requiring live API access (skipped by default)
slow: Slow tests
# Ignore warnings from dependencies
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning