Skip to content

Commit 5523b7d

Browse files
authored
Fix subprocess coverage tracking with new pytest-cov. (#231)
1 parent f2556ea commit 5523b7d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ filename = "scrapy_poet/VERSION"
1818

1919
[tool.coverage.run]
2020
branch = true
21+
patch = [
22+
"subprocess",
23+
]
24+
source_pkgs = ["scrapy_poet"]
2125

2226
[tool.coverage.paths]
2327
source = [
@@ -27,7 +31,6 @@ source = [
2731

2832
[tool.coverage.report]
2933
exclude_also = [
30-
"if TYPE_CHECKING:",
3134
"@(abc\\.)?abstractmethod",
3235
]
3336

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ envlist = min,pinned-scrapy-2x7,pinned-scrapy-2x8,py39,py310,py311,py312,py313,a
44
[testenv]
55
deps =
66
pytest
7-
pytest-cov
7+
pytest-cov >= 7.0.0
88
pytest-twisted
99
Twisted
1010
setenv =
1111
REACTOR=asyncio
1212
commands =
13-
py.test \
13+
pytest \
1414
--cov-config=pyproject.toml --cov-report=term --cov-report=html --cov-report= --cov-report=xml --cov=scrapy_poet \
1515
--doctest-modules \
1616
--reactor=asyncio \

0 commit comments

Comments
 (0)