/
githubmirror
/
oppia
Обзор
Документация
Войти
/
githubmirror
/
oppia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pytest.ini
72 строки
2 KB
Sean Lip
Add basic infrastructure for pytest (#23919)
01 дек 2025, 03:00
Не верифицирован
01 дек 2025, 03:00
c207247
Код
Авторство
О чём код?
[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.