File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ test = [
54
54
" build[uv, virtualenv]" ,
55
55
" filelock >= 3" ,
56
56
" pytest >= 6.2.4" ,
57
- " pytest-cov >= 2.12 " ,
57
+ " coverage[toml]>=5.1 " ,
58
58
" pytest-mock >= 2" ,
59
59
" pytest-rerunfailures >= 9.1" ,
60
60
" pytest-xdist >= 1.34" ,
@@ -100,6 +100,7 @@ exclude_also = [
100
100
' ^\s*raise NotImplementedError\b' ,
101
101
" if typing.TYPE_CHECKING:" ,
102
102
]
103
+ show_missing = true
103
104
104
105
[tool .coverage .paths ]
105
106
build = [
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ def local_pip(monkeypatch):
80
80
81
81
@pytest .fixture (autouse = True )
82
82
def avoid_constraints (monkeypatch ):
83
- monkeypatch .delenv (" PIP_CONSTRAINT" , raising = False )
84
- monkeypatch .delenv (" UV_CONSTRAINT" , raising = False )
83
+ monkeypatch .delenv (' PIP_CONSTRAINT' , raising = False )
84
+ monkeypatch .delenv (' UV_CONSTRAINT' , raising = False )
85
85
86
86
87
87
@pytest .fixture (autouse = True , params = [False ])
Original file line number Diff line number Diff line change @@ -28,9 +28,10 @@ set_env =
28
28
PYTHONWARNDEFAULTENCODING = 1
29
29
TEST_STATUS_DIR = {envtmpdir}
30
30
commands =
31
- pytest -ra --cov --cov-config pyproject.toml \
32
- --cov-report =html:{envdir}/htmlcov --cov-context =test \
33
- --cov-report =xml:{toxworkdir}/coverage.{envname}.xml {posargs:-n auto}
31
+ coverage run --context =test --data-file ={envdir}/.coverage -m pytest -ra {posargs:-n auto}
32
+ coverage html --data-file ={envdir}/.coverage --directory ={envdir}/htmlcov
33
+ coverage xml --data-file ={envdir}/.coverage -o {toxworkdir}/coverage.{envname}.xml
34
+ coverage report --data-file{envdir}/.coverage
34
35
35
36
[testenv:fix]
36
37
description = run static analysis and style checks
@@ -100,8 +101,8 @@ pass_env =
100
101
DIFF_AGAINST
101
102
set_env =
102
103
commands =
103
- coverage combine {toxworkdir}
104
- coverage report --skip-covered --show-missing - i
104
+ coverage combine {envdir}/*
105
+ coverage report --skip-covered -i
105
106
coverage xml -o {toxworkdir}/coverage.xml -i
106
107
coverage html -d {toxworkdir}/htmlcov -i
107
108
python -m diff_cover.diff_cover_tool --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
You can’t perform that action at this time.
0 commit comments