forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
72 lines (62 loc) · 2.12 KB
/
pytest.ini
File metadata and controls
72 lines (62 loc) · 2.12 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
[pytest]
# Pytest configuration for Oppia backend tests.
# Test discovery patterns.
# python_files: discover test files matching these patterns.
# python_classes: discover test classes matching these patterns. Using * to match all classes.
# python_functions: discover test functions matching these patterns.
python_files = *_test.py
python_classes = *
python_functions = test_*
# Test paths.
testpaths = .
# Exclude patterns.
norecursedirs =
.git
.mypy_cache
__pycache__
node_modules
oppia_tools
third_party
core/tests/data
core/tests/load_tests
core/tests/build_sources
.direnv
# Output options.
# -v: verbose output (shows individual test names).
# --tb=short: shorter traceback format on failures.
# --strict-markers: error if using undefined markers.
# --disable-warnings: suppress warnings from dependencies.
addopts =
-v
--tb=short
--strict-markers
--disable-warnings
# Parallel execution (pytest-xdist).
# Uncomment the options below to enable parallel test execution across CPU cores.
# -n auto: automatically uses all available CPU cores.
# --dist=loadscope: ensures tests from same file run in same worker (important
# for tests that share module-level state).
# Note: Not enabled by default as it requires pytest-xdist plugin and may cause
# issues with tests that aren't isolated properly.
#addopts =
# -n auto
# --dist=loadscope
# Timeout for each test in seconds (prevents hanging tests).
timeout = 300
timeout_method = thread
# Markers for test categorization.
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
load_test: marks tests as load tests (in core/tests/load_tests)
shard1: tests in shard 1 (for CI)
shard2: tests in shard 2 (for CI)
shard3: tests in shard 3 (for CI)
shard4: tests in shard 4 (for CI)
shard5: tests in shard 5 (for CI)
# Log configuration.
log_cli = false
log_cli_level = INFO
# Coverage options (enable with --cov flag).
# Usage: pytest --cov=core --cov-report=html --cov-report=term-missing.
# These are NOT in addopts by default to keep tests fast.