Enable python subprocess coverage tracking in tests

This commit is contained in:
aliowka 2026-06-17 19:27:11 +03:00
parent 547cae3e75
commit 086b1e4c31
3 changed files with 6 additions and 0 deletions

View File

@ -160,6 +160,7 @@ serialize = ["{major}.{minor}"]
# sysmon, default on 3.14, is too slow: https://github.com/coveragepy/coveragepy/issues/2172
core = "ctrace"
branch = true
parallel = true
include = ["scrapy/*"]
omit = ["tests/*"]
disable_warnings = ["include-ignored"]

2
tests/sitecustomize.py Normal file
View File

@ -0,0 +1,2 @@
import coverage
coverage.process_startup()

View File

@ -53,6 +53,8 @@ deps =
{[test-requirements]deps}
pytest >= 8.4.1 # https://github.com/pytest-dev/pytest/pull/13502
deltatest-cli
setenv =
COVERAGE_PROCESS_STARTUP = {toxinidir}/pyproject.toml
passenv =
PYTEST_ADDOPTS
S3_TEST_FILE_URI
@ -63,6 +65,7 @@ passenv =
GCS_PROJECT_ID
DELTA_*
GITHUB_*
COVERAGE_PROCESS_STARTUP
#allow tox virtualenv to upgrade pip/wheel/setuptools
download = true
commands =