-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.ini
More file actions
89 lines (79 loc) · 3.29 KB
/
Copy pathpytest.ini
File metadata and controls
89 lines (79 loc) · 3.29 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
[pytest]
# Pytest configuration for smart contract integration testing
# ============================================================================
# Test Discovery
# ============================================================================
minversion = 7.0
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# ============================================================================
# Markers (Test Categories)
# ============================================================================
markers =
integration: Integration tests requiring blockchain interaction
security: Security-focused adversarial tests (attack vectors)
slow: Tests that take >30 seconds to complete
chainsim: Tests that require chain simulator (controllable blockchain)
devnet: Tests that require devnet connection
shadowfork: Tests that require shadowfork environment
skip_on_live: Skip on real networks (destructive/state-modifying tests)
# Contract-specific markers
pair: Tests for Pair contract
farm: Tests for Farm contract
router: Tests for Router contract
metastaking: Tests for Metastaking contract
# Test type markers
happy_path: Normal operation tests (expected to succeed)
edge_case: Boundary condition tests (zero amounts, max values)
malicious: Malicious input tests (expected to fail)
# ============================================================================
# Output and Reporting
# ============================================================================
addopts =
# Verbose output
-v
# Show extra test summary info
-ra
# Strict marker enforcement (fail on unknown markers)
--strict-markers
# Shorter traceback format
--tb=short
# Show slowest 10 tests
--durations=10
# Show local variables on failures
-l
# Capture method: no capture (show print statements)
-s
# ============================================================================
# Warnings
# ============================================================================
filterwarnings =
# Ignore deprecation warnings from dependencies
ignore::DeprecationWarning
# Ignore pytest warnings about async
ignore::pytest.PytestUnraisableExceptionWarning
# ============================================================================
# Coverage (if pytest-cov installed)
# ============================================================================
# Uncomment to enable coverage reporting
# addopts = --cov=tests --cov-report=html --cov-report=term
# ============================================================================
# Logging
# ============================================================================
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
# File logging
log_file = tests/logs/pytest.log
log_file_level = DEBUG
log_file_format = %(asctime)s [%(levelname)8s] %(name)s - %(message)s
log_file_date_format = %Y-%m-%d %H:%M:%S
# ============================================================================
# Timeout (if pytest-timeout installed)
# ============================================================================
# Uncomment to set global timeout
# timeout = 300
# timeout_method = thread