-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
122 lines (107 loc) · 3.92 KB
/
pytest.ini
File metadata and controls
122 lines (107 loc) · 3.92 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
112
113
114
115
116
117
118
119
120
121
122
[pytest]
testpaths = tests
python_files = test_*.py *_test.py
python_classes = Test* *Tests
python_functions = test_*
# Skip directories that are not test code. ``config`` and ``logs`` may be
# permissions-restricted on dev hosts (Mac SMB share mirroring the Unraid
# container) and pytest's recursive conftest discovery would otherwise
# fail before the first test runs.
norecursedirs =
.git
.venv
venv
config
logs
cached_animations
cached_displays
encrypted_assets
assets
locales
docker
docs
extras
scripts
tools
node_modules
minversion = 7.0
addopts =
--verbose
--tb=short
--strict-markers
--strict-config
--ignore-glob=**/config
--ignore-glob=**/logs
--ignore-glob=**/cached_animations
--ignore-glob=**/cached_displays
--ignore-glob=**/encrypted_assets
--cov=services
--cov=app
--cov=utils
--cov-report=term-missing
--cov-report=html
--cov-report=xml
# Coverage gate is opt-in: workflows that run the FULL suite (e.g.
# docker-publish.yml) should append --cov-fail-under=50. We don't enforce
# it here because CI jobs that intentionally run only a subset (perf,
# memory) would otherwise fail with low coverage.
#
# Two test files require isolation (sys.modules manipulation pollutes
# subsequent test imports): tests/unit/app_modules/ and
# tests/unit/services/web/test_configuration_services.py. Run them in
# their own pytest invocation. The combined coverage of (main suite +
# those two isolated) is 51% as of v2.2.3.
asyncio_mode = auto
markers =
unit: Unit tests
integration: Integration tests
e2e: End-to-end tests
security: Security tests
performance: Performance tests
slow: Slow running tests
docker: Tests requiring Docker daemon
web: Web UI tests requiring browser
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore:.*unclosed.*:ResourceWarning
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
# Performance Testing Configuration (pytest-benchmark)
[benchmark]
min_rounds = 5
min_time = 0.000005
max_time = 1.0
timer = time.perf_counter
disable_gc = true
warmup = true
warmup_iterations = 100000
# Performance Baselines and Thresholds
# These values define acceptable performance for critical operations
[performance:thresholds]
# ConfigService performance targets
config_load_max_time = 1.0 # Maximum 1 second for config load
config_cached_max_time = 0.1 # Maximum 100ms for cached config access
token_encrypt_max_time = 0.5 # Maximum 500ms for token encryption
token_decrypt_max_time = 0.5 # Maximum 500ms for token decryption
# Docker Async Queue performance targets
docker_client_acquire_max = 0.5 # Maximum 500ms to acquire client
docker_concurrent_success = 0.95 # Minimum 95% success rate for concurrent operations
docker_queue_throughput_min = 10 # Minimum 10 operations/second
# MechService performance targets
mech_power_calc_max = 0.001 # Maximum 1ms for power calculation
mech_evolution_calc_max = 0.001 # Maximum 1ms for evolution calculation
mech_state_access_max = 0.1 # Maximum 100ms for state access
# Web UI performance targets
web_login_max_time = 1.0 # Maximum 1 second for login page
web_dashboard_max_time = 2.0 # Maximum 2 seconds for dashboard
web_api_response_max = 0.5 # Maximum 500ms for API responses
# Memory usage thresholds
memory_increase_max_mb = 100 # Maximum 100MB memory increase during tests
memory_leak_threshold_mb = 50 # Maximum 50MB for potential memory leak detection
# Concurrent operation thresholds
concurrent_success_rate = 0.95 # Minimum 95% success rate
concurrent_avg_duration = 0.5 # Maximum 500ms average duration
concurrent_throughput_min = 20 # Minimum 20 operations/second