-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
79 lines (70 loc) · 2.77 KB
/
Copy pathpytest.ini
File metadata and controls
79 lines (70 loc) · 2.77 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
[pytest]
# Test discovery
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
norecursedirs = bengal .git .tox dist build *.egg .hypothesis .pytest_cache
# Async test support
asyncio_mode = auto
# Pytest options (fast PR default: exclude long-running suites)
# -v: verbose (show test names, especially useful for failures)
# --tb=short: concise tracebacks (shows file:line for each frame)
# -ra: show summary of all test outcomes (passed, failed, skipped, etc.)
# --durations=10: show 10 slowest tests
addopts = -n auto -v --tb=short -ra --durations=10 -m "not performance and not stateful and not slow"
# Console output
# Note: -v overrides progress style, showing test names instead of dots
# This makes failures immediately visible with test names
console_output_style = progress
# Timeout configuration (prevent hanging tests)
# thread method is required: signal method causes deadlocks when
# ThreadPoolExecutor.__exit__ calls shutdown(wait=True) after SIGALRM fires
timeout = 300
timeout_method = thread
# Warnings
filterwarnings =
error::DeprecationWarning
ignore::pytest.PytestUnraisableExceptionWarning
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore::pytest_benchmark.logger.PytestBenchmarkWarning
# Temporary directory retention (keep failed test dirs for debugging)
tmp_path_retention_count = 3
tmp_path_retention_policy = failed
# Markers
markers =
unit: Unit tests (fast, isolated)
integration: Integration tests (slower, multiple components)
e2e: End-to-end tests (full workflows)
cli: CLI command tests
requires_network: Tests requiring internet access
parallel_unsafe: Tests that cannot run in parallel with pytest-xdist (uses ThreadPoolExecutor/ProcessPoolExecutor internally, global state conflicts)
memory_intensive: Tests using >500MB RAM
hypothesis: Property-based tests using Hypothesis
serial: tests that must run sequentially (no parallel, similar to parallel_unsafe)
slow: Slow tests (long-running, typically >10s)
performance: Performance/benchmark or high-scale tests (exclude by default)
stateful: Long-running state-machine/workflow tests (exclude by default)
autodoc: Tests requiring pre-built site (site/public); run after docs build
known_gap: XFAIL tests documenting known issues; run in nightly only
heavyweight: Tests that typically exceed ~15s (full site builds, large roots); for reporting
# Coverage options
[coverage:run]
source = bengal
omit =
*/tests/*
*/test_*.py
*/__pycache__/*
[coverage:report]
fail_under = 85
exclude_lines =
pragma: no cover
def __repr__
def __str__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
@abstractmethod
@abc.abstractmethod