File tree Expand file tree Collapse file tree 3 files changed +13
-28
lines changed Expand file tree Collapse file tree 3 files changed +13
-28
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ tests = [
97
97
" pytest-subtests" ,
98
98
" pytest-rerunfailures" ,
99
99
" coverage" ,
100
- " pytest-cov" ,
101
100
" requests-mock" ,
102
101
# mechanicalsoup hard-depends on lxml (see below)
103
102
' mechanicalsoup; (implementation_name != "pypy" and python_version <= "3.12")' ,
Original file line number Diff line number Diff line change @@ -36,28 +36,21 @@ function install-dev {
36
36
pre-commit install --install-hooks
37
37
}
38
38
39
-
40
39
function test {
41
40
pytest --runslow " $@ "
42
41
}
43
42
44
-
45
- function coverage-all {
46
- clean-pyc
47
- # TODO: do we need to --cov-context=test all the time?
48
- coverage-run --cov-context=test " $@ "
49
- coverage-report --show-contexts
50
- }
51
-
52
- function coverage-run {
53
- # TODO: is pytest-cov needed?
54
- pytest --runslow --cov " $@ "
43
+ function coverage {
44
+ unset -f coverage
45
+ coverage run -m pytest --runslow " $@ "
46
+ coverage html
47
+ coverage-report
55
48
}
56
49
57
50
function coverage-report {
58
- coverage html " $@ "
51
+ # library only "coverage report --fail-under 100"
52
+ unset -f coverage
59
53
coverage report \
60
- --include ' */reader/*' \
61
54
--omit " $(
62
55
echo "
63
56
*/reader/_vendor/*
@@ -76,7 +69,7 @@ function coverage-report {
76
69
77
70
78
71
function test-all {
79
- tox -p
72
+ tox p " $@ "
80
73
}
81
74
82
75
@@ -147,21 +140,12 @@ function entr-project-files {
147
140
}
148
141
149
142
150
- function clean-pyc {
151
- local IFS=$' \n '
152
- find \
153
- $( ls-project-files | grep / | cut -d/ -f1 | uniq ) \
154
- -name ' *.pyc' -or -name ' *.pyo' \
155
- -exec rm -rf {} +
156
- }
157
-
158
-
159
143
function ci-install {
160
144
pip install -e ' .[all]' --group tests --group typing
161
145
}
162
146
163
147
function ci-run {
164
- coverage- run -v && coverage-report && typing
148
+ command coverage run -m pytest --runslow && coverage-report && typing
165
149
}
166
150
167
151
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dependency_groups = tests
8
8
allowlist_externals =
9
9
./run.sh
10
10
11
- commands = {posargs:./run.sh coverage- run --cov- append -v}
11
+ commands = coverage run --append -m pytest --runslow
12
12
13
13
depends =
14
14
py{313,312,311,py311}: coverage-clean
@@ -22,7 +22,9 @@ commands = coverage erase
22
22
[testenv:coverage-report]
23
23
deps = coverage
24
24
skip_install = true
25
- commands = ./run.sh coverage-report
25
+ commands =
26
+ coverage html
27
+ ./run.sh coverage-report
26
28
27
29
[testenv:typing]
28
30
dependency_groups = typing
You can’t perform that action at this time.
0 commit comments