-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
60 lines (53 loc) · 1.63 KB
/
pytest.ini
File metadata and controls
60 lines (53 loc) · 1.63 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
[tool:pytest]
# GitGuard Test Configuration with Flexible Coverage Gates
# Supports different coverage requirements based on development phase
# Basic pytest configuration
minversion = 7.0
testpaths = tests
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
addopts =
--strict-markers
--strict-config
--tb=short
--maxfail=10
-ra
--cov-config=.coveragerc
# Test markers for different scenarios
markers =
unit: Unit tests (fast, isolated)
integration: Integration tests (slower, requires services)
e2e: End-to-end tests (slowest, full system)
policy: Policy tests (OPA evaluation)
chaos: Chaos engineering tests
slow: Tests that take more than 5 seconds
initial_dev: Tests for code in initial development phase
incomplete_fixtures: Tests with incomplete OPA fixtures
coverage_exempt: Tests exempt from strict coverage requirements
experimental: Experimental features with relaxed requirements
# Async test configuration
asyncio_mode = auto
# Warnings configuration
filterwarnings =
error
ignore::UserWarning
ignore::DeprecationWarning:pkg_resources.*
ignore::PendingDeprecationWarning
# Test discovery
collect_ignore = [
"setup.py",
"build",
"dist",
".tox",
".venv",
"venv",
"node_modules"
# Logging configuration for tests
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
# Coverage configuration references
# See .coveragerc for detailed coverage settings
# Coverage gates are handled by CI workflow based on development phase