-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
47 lines (40 loc) · 1.38 KB
/
pytest.ini
File metadata and controls
47 lines (40 loc) · 1.38 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
41
42
43
44
45
46
47
[pytest]
# Pytest configuration for PoopyFeed backend
# Enables fast test execution with parallelization
# Django settings module
DJANGO_SETTINGS_MODULE = django_project.test_settings
# Test discovery
python_files = test_*.py tests.py
python_classes = Test*
python_functions = test_*
# Markers for test categorization
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
unit: marks tests as unit tests
api: marks tests as API tests
parallel_unsafe: marks tests that conflict in parallel execution
redis_dependent: marks tests that require Redis (analytics, cache)
# Default options for pytest
addopts =
--strict-markers
--tb=short
--cov=.
--cov-config=.coveragerc
--cov-report=html:htmlcov
--cov-report=term-missing
# Timeout for each test (seconds)
timeout = 10
# Minimum Python version
minversion = 3.8
# Parallel execution options
# Usage:
# pytest -n 4 # 4 workers
# pytest -n auto # Auto-detect CPU cores
# pytest -n 4 --dist loadscope # Group tests by class (recommended)
# pytest -n 4 -m "not parallel_unsafe" # Exclude conflict-prone tests
#
# Performance benchmarks:
# Sequential (standard): 45-55 seconds
# Parallel (4 workers): 15-20 seconds (3-4x faster)
# Parallel (auto): varies by CPU cores