-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
92 lines (83 loc) · 2.18 KB
/
pytest.ini
File metadata and controls
92 lines (83 loc) · 2.18 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
[pytest]
# Pytest Configuration for RansomwareDetector
# Test discovery patterns
python_files = test_*.py *_test.py
python_classes = Test* *Tests
python_functions = test_*
# Test paths
testpaths = tests
# Markers for test categorization (must be before addopts)
markers =
unit: Unit tests
integration: Integration tests
slow: Slow running tests
core: Core functionality tests
monitor: Monitor module tests
controller: Controller module tests
executor: Executor module tests
utils: Utility module tests
smoke: Smoke tests for quick validation
security: Security-related tests
performance: Performance tests
whitelist: Whitelist functionality tests
asyncio: Async tests using asyncio
# Output options
addopts =
# Verbose output
-v
# Show local variables in tracebacks
-l
# Show summary of all test outcomes
-ra
# Coverage options
--cov=backend
--cov-report=html:reports/coverage/html
--cov-report=xml:reports/coverage/coverage.xml
--cov-report=term-missing:skip-covered
# JUnit XML report for CI/CD integration
--junit-xml=reports/junit/junit.xml
# Generate HTML report
--html=reports/report.html
--self-contained-html
# Show test durations (top 10 slowest)
--durations=10
# Strict markers - ensure all markers are registered
--strict-markers
# Disable warnings in summary
-p no:warnings
# Coverage options
[coverage:run]
source = backend
omit =
*/tests/*
*/test_*
*/__pycache__/*
*/venv/*
*/env/*
*/.venv/*
parallel = True
concurrency = multiprocessing
[coverage:report]
precision = 2
show_missing = True
skip_covered = True
skip_empty = True
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
@abstractmethod
[coverage:html]
directory = reports/coverage/html
# Logging
log_cli = false
log_cli_level = INFO
log_file = reports/logs/pytest.log
log_file_level = DEBUG
log_file_format = %(asctime)s [%(levelname)8s] [%(name)s] %(filename)s:%(lineno)s %(message)s
log_file_date_format = %Y-%m-%d %H:%M:%S
# Minimum Python version
minversion = 3.8