-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
87 lines (73 loc) · 2.25 KB
/
pytest.ini
File metadata and controls
87 lines (73 loc) · 2.25 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
[pytest]
# Minimum Python version
minversion = 8.0
# Directories to search for tests
testpaths = tests
# Pattern for test files
python_files = test_*.py
# Pattern for test classes
python_classes = Test*
# Pattern for test functions
python_functions = test_*
# Add current directory to Python path
pythonpath = . src
# Command line options to use by default
addopts =
# Verbose output
-v
# Show extra test summary info
-ra
# Show local variables in tracebacks
--showlocals
# Enable strict markers (all markers must be registered)
--strict-markers
# Enable strict config (warn about unknown config options)
--strict-config
# Coverage options
--cov=src
--cov-report=html
--cov-report=term-missing
--cov-report=xml
--cov-report=json
--cov-branch
--cov-fail-under=90.0
# Parallel execution for faster test runs
# -n logical
# Set default timeout for all tests (in seconds)
--timeout=30
# Timeout method (thread-based is more compatible)
--timeout-method=thread
# Fail on first error (optional, comment out if you want to see all failures)
# -x
# Show warnings
-W default
# Capture method
--capture=fd
# Markers for categorizing tests
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
unit: marks tests as unit tests
performance: marks tests as performance/benchmark tests
network: marks tests that require network access
database: marks tests that require database access
gui: marks tests for GUI components
# Ignore deprecation warnings from external libraries
filterwarnings =
# Treat all warnings as errors except those explicitly ignored
error
# Ignore specific warnings from external libraries as needed
# Example: ignore::DeprecationWarning:module_name
# Console output style
console_output_style = progress
# Log level for test output
log_level = INFO
# Log format
log_format = %(asctime)s %(levelname)s %(message)s
log_date_format = %Y-%m-%d %H:%M:%S
# JUnit XML output for CI/CD integration
junit_family = xunit2
# Asyncio mode for pytest-asyncio
asyncio_mode = auto
# Timeout for async tests (seconds)
asyncio_default_fixture_loop_scope = function