-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpytest.ini
More file actions
76 lines (66 loc) · 2.41 KB
/
Copy pathpytest.ini
File metadata and controls
76 lines (66 loc) · 2.41 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
[pytest]
# Pytest configuration for Wildbox Security Platform
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Minimum version requirement
minversion = 7.0
# Test paths
testpaths = tests
# Output options
addopts =
-v
--strict-markers
--tb=short
--disable-warnings
--color=yes
--junitxml=pytest-results.xml
--html=tests/integration/reports/report.html
--self-contained-html
-p no:cacheprovider
# Markers for test categorization
markers =
unit: Unit tests that don't require external services
integration: Integration tests requiring Docker services
e2e: End-to-end tests requiring full stack
security: Security-focused tests (penetration, vulnerability scanning)
slow: Tests that take longer than 5 seconds
smoke: Smoke tests for quick validation
security: Security-focused tests
performance: Performance and load tests
flaky: occasionally fails due to network or timing, not a code defect
critical: core functionality; must always pass
requires_gateway: needs the gateway service running
requires_database: needs database connectivity
requires_redis: needs Redis connectivity
chaos: fault-injection experiments; kill and restart containers, assert recovery
# Logging and timeout. These used to sit at the bottom of the file, after the
# [coverage:*] sections, which meant configparser read them as coverage options
# and pytest never saw them. `timeout` additionally needs pytest-timeout
# installed; without it pytest warns and ignores the key.
log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
# Asyncio configuration
asyncio_mode = auto
# session, not function: the integration conftest shares one httpx client and
# one readiness check across the whole run. With a function-scoped default,
# pytest-asyncio bound those session fixtures to a per-test runner and every
# test died in setup with "ScopeMismatch: You tried to access the function
# scoped fixture _function_scoped_runner with a session scoped request object"
# -- 81 errors, zero tests actually executed.
asyncio_default_fixture_loop_scope = session
# Coverage options (when using pytest-cov)
[coverage:run]
source = .
omit =
*/tests/*
*/venv/*
*/.venv/*
*/site-packages/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False