-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.ini
More file actions
85 lines (77 loc) · 1.96 KB
/
Copy pathpytest.ini
File metadata and controls
85 lines (77 loc) · 1.96 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
[pytest]
# Pytest configuration for the Customer Support Analyzer backend
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Directories to search for tests
testpaths = app/tests
# Minimum Python version
minversion = 3.12
# Command line options always used
addopts =
# Verbose output
-v
# Show extra test summary info
-ra
# Show local variables in tracebacks
--showlocals
# Run tests in parallel (requires pytest-xdist)
# -n auto
# Coverage options
--cov=app
--cov-report=html:htmlcov
--cov-report=term-missing
--cov-report=xml
# Fail if coverage is below threshold
--cov-fail-under=90
# Strict markers - fail on unknown markers
--strict-markers
# Show warnings
-W ignore::DeprecationWarning
# Markers for categorizing tests
markers =
unit: Unit tests (fast, isolated, no external dependencies)
integration: Integration tests (test multiple components together)
e2e: End-to-end tests (test complete user workflows)
slow: Tests that take more than 1 second
auth: Authentication and authorization tests
ml: Machine learning related tests
api: API endpoint tests
database: Database tests
cache: Redis/caching tests
celery: Celery task tests
security: Security tests
performance: Performance tests
# Coverage configuration
[coverage:run]
source = app
omit =
*/tests/*
*/test_*.py
*/__pycache__/*
*/venv/*
*/migrations/*
*/alembic/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False
exclude_lines =
# Standard pragma
pragma: no cover
# Debug-only code
def __repr__
# Abstract methods
@abstractmethod
# Type checking blocks
if TYPE_CHECKING:
# Non-runnable code
if __name__ == .__main__.:
# Defensive programming
raise AssertionError
raise NotImplementedError
# Pass statements
pass
[coverage:html]
directory = htmlcov