-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
111 lines (96 loc) · 2.87 KB
/
pytest.ini
File metadata and controls
111 lines (96 loc) · 2.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[pytest]
# Test discovery
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Minimum version requirement
minversion = 6.0
# Add project root to Python path
addopts =
--strict-markers
--strict-config
--verbose
--tb=short
--capture=no
--html=reports/pytest_report.html
--self-contained-html
--cov=core
--cov=services
--cov=utils
--cov-report=html:reports/coverage
--cov-report=term-missing
--cov-fail-under=80
--durations=10
# Custom markers for test categorization
markers =
unit: Unit tests for individual components
integration: Integration tests for API endpoints
smoke: Smoke tests for basic functionality
regression: Regression tests for bug fixes
performance: Performance and load tests
slow: Tests that take more time to execute
flaky: Tests that might be unstable
skip_ci: Tests to skip in CI environment
requires_network: Tests that require network connectivity
# HTTP method markers
get: Tests for GET requests
post: Tests for POST requests
put: Tests for PUT requests
patch: Tests for PATCH requests
delete: Tests for DELETE requests
# Endpoint markers
users: Tests for /users endpoint
posts: Tests for /posts endpoint
comments: Tests for /comments endpoint
# Test type markers
positive: Positive test cases (happy path)
negative: Negative test cases (error scenarios)
boundary: Boundary value testing
security: Security-related tests
# Test collection options are defined in conftest.py
# Warnings configuration
filterwarnings =
error
ignore::UserWarning
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
# Log configuration
log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(name)s: %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
# File logging
log_file = reports/pytest.log
log_file_level = DEBUG
log_file_format = %(asctime)s [%(levelname)8s] %(filename)s:%(lineno)d: %(funcName)s(): %(message)s
log_file_date_format = %Y-%m-%d %H:%M:%S
# Timeout configuration (requires pytest-timeout)
timeout = 300
timeout_method = thread
# Parallel execution (requires pytest-xdist)
# Use with: pytest -n auto
# Uncomment the line below to set default workers
# addopts = -n auto
# Environment variables can be set using pytest-env plugin or OS environment
# Configure coverage
[coverage:run]
source = .
omit =
*/tests/*
*/venv/*
*/env/*
setup.py
conftest.py
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
class .*\bProtocol\):
@(abc\.)?abstractmethod