Skip to content

Commit fd19162

Browse files
committed
Collect unit test coverage
1 parent e86b3a6 commit fd19162

File tree

4 files changed

+49
-195
lines changed

4 files changed

+49
-195
lines changed

.config/.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[run]
2+
branch = true
3+
source = python_minifier
4+
parallel = true
5+
context = ${COVERAGE_CONTEXT}
6+
7+
[report]
8+
exclude_lines =
9+
pragma: no cover
10+
raise NotImplementedError
11+
if TYPE_CHECKING:
12+
13+
[paths]
14+
source =
15+
src/python_minifier
16+
*/site-packages/python_minifier

.config/.coveragerc-legacy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[run]
2+
branch = true
3+
source = python_minifier
4+
parallel = true
5+
6+
[report]
7+
exclude_lines =
8+
pragma: no cover
9+
raise NotImplementedError
10+
if TYPE_CHECKING:
11+
12+
[paths]
13+
source =
14+
src/python_minifier
15+
*/site-packages/python_minifier

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ docs/source/transforms/*.min.py
1818
.circleci-config.yml
1919
.coverage
2020
.mypy_cache/
21+
.tox/

tox.ini

Lines changed: 17 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -4,246 +4,68 @@ envlist = python27,python33,python34,python35,python36,python37,python38,python3
44
[testenv]
55
setenv =
66
PYTHONHASHSEED = 0
7+
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
8+
COVERAGE_CONTEXT = {envname}
9+
deps = -r{toxinidir}/tox/{envname}-requirements.txt
710
commands =
8-
pytest {posargs:test} --junitxml=junit-{envname}.xml --verbose
11+
pytest {posargs:test --cov --cov-config={toxinidir}/.config/.coveragerc} --junitxml=junit-{envname}.xml --verbose
912

1013
[testenv:python27]
1114
basepython = /usr/bin/python2.7
12-
deps =
13-
atomicwrites==1.4.1
14-
attrs==20.3.0
15-
backports.functools-lru-cache==1.6.6
16-
configparser==4.0.2
17-
contextlib2==0.6.0.post1
18-
funcsigs==1.0.2
19-
importlib-metadata==2.1.3
20-
more-itertools==5.0.0
21-
pathlib2==2.3.7.post1
22-
pluggy==0.13.1
23-
py==1.11.0
24-
pytest==4.5.0
25-
PyYAML==5.1
26-
scandir==1.10.0
27-
sh==1.12.14
28-
six==1.16.0
29-
typing==3.10.0.0
30-
wcwidth==0.2.13
31-
zipp==1.2.0
3215

3316
[testenv:python33]
3417
basepython = /usr/bin/python3.3
35-
deps =
36-
py==1.4.34
37-
pytest==3.2.5
38-
PyYAML==3.13
39-
sh==1.12.14
18+
setenv =
19+
PYTHONHASHSEED = 0
20+
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
21+
commands =
22+
pytest {posargs:test --cov --cov-config={toxinidir}/.config/.coveragerc-legacy} --junitxml=junit-{envname}.xml --verbose
4023

4124
[testenv:python34]
4225
basepython = /usr/bin/python3.4
43-
deps =
44-
atomicwrites==1.4.1
45-
attrs==20.3.0
46-
importlib-metadata==1.1.3
47-
more-itertools==7.2.0
48-
pathlib2==2.3.7.post1
49-
pluggy==0.13.1
50-
py==1.10.0
51-
pytest==4.5.0
52-
PyYAML==5.1
53-
scandir==1.10.0
54-
sh==1.12.14
55-
six==1.16.0
56-
typing==3.10.0.0
57-
wcwidth==0.2.13
58-
zipp==1.2.0
26+
setenv =
27+
PYTHONHASHSEED = 0
28+
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
29+
commands =
30+
pytest {posargs:test --cov --cov-config={toxinidir}/.config/.coveragerc-legacy} --junitxml=junit-{envname}.xml --verbose
5931

6032
[testenv:python35]
6133
basepython = /usr/bin/python3.5
62-
deps =
63-
atomicwrites==1.4.1
64-
attrs==20.3.0
65-
importlib-metadata==2.1.3
66-
more-itertools==8.14.0
67-
pathlib2==2.3.7.post1
68-
pluggy==0.13.1
69-
py==1.11.0
70-
pytest==4.5.0
71-
PyYAML==5.1
72-
sh==1.12.14
73-
six==1.16.0
74-
wcwidth==0.2.13
75-
zipp==1.2.0
7634

7735
[testenv:python36]
7836
basepython = /usr/bin/python3.6
79-
deps =
80-
atomicwrites==1.4.1
81-
attrs==20.3.0
82-
importlib-metadata==4.8.3
83-
more-itertools==8.14.0
84-
pluggy==0.13.1
85-
py==1.11.0
86-
pytest==4.5.0
87-
PyYAML==5.1
88-
sh==1.12.14
89-
six==1.16.0
90-
typing-extensions==4.1.1
91-
wcwidth==0.2.13
92-
zipp==3.6.0
9337

9438
[testenv:python37]
9539
basepython = /usr/bin/python3.7
96-
deps =
97-
atomicwrites==1.4.1
98-
attrs==20.3.0
99-
importlib-metadata==6.7.0
100-
more-itertools==9.1.0
101-
pluggy==0.13.1
102-
py==1.11.0
103-
pytest==4.5.0
104-
PyYAML==5.1
105-
sh==1.12.14
106-
six==1.16.0
107-
typing-extensions==4.7.1
108-
wcwidth==0.2.13
109-
zipp==3.15.0
11040

11141
[testenv:python38]
11242
basepython = /usr/bin/python3.8
113-
deps =
114-
atomicwrites==1.4.1
115-
attrs==20.3.0
116-
more-itertools==10.5.0
117-
pluggy==0.13.1
118-
py==1.11.0
119-
pytest==4.5.0
120-
PyYAML==5.1
121-
sh==1.12.14
122-
six==1.16.0
123-
wcwidth==0.2.13
12443

12544
[testenv:python39]
12645
basepython = /usr/local/bin/python3.9
127-
deps =
128-
exceptiongroup==1.2.2
129-
iniconfig==2.0.0
130-
packaging==24.1
131-
pluggy==1.5.0
132-
pytest==8.3.3
133-
PyYAML==6.0.2
134-
sh==2.0.7
135-
tomli==2.0.1
13646

13747
[testenv:python310]
13848
basepython = /usr/local/bin/python3.10
13949
setenv =
50+
PYTHONHASHSEED = 0
51+
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
52+
COVERAGE_CONTEXT = {envname}
14053
PIP_CONSTRAINT={toxinidir}/tox/pyyaml-5.4.1-constraints.txt
141-
deps =
142-
attrs==24.2.0
143-
iniconfig==2.0.0
144-
packaging==24.1
145-
pluggy==0.13.1
146-
py==1.11.0
147-
pyperf==2.2.0
148-
pytest==6.2.4
149-
PyYAML==5.4.1
150-
sh==1.14.2
151-
toml==0.10.2
15254

15355
[testenv:python311]
15456
basepython = /usr/local/bin/python3.11
155-
deps =
156-
attrs==24.2.0
157-
iniconfig==2.0.0
158-
packaging==24.1
159-
pluggy==1.5.0
160-
py==1.11.0
161-
pyperf==2.4.1
162-
pytest==7.1.2
163-
PyYAML==6.0
164-
sh==1.14.3
165-
tomli==2.0.1
16657

16758
[testenv:python312]
16859
basepython = /usr/local/bin/python3.12
169-
deps =
170-
iniconfig==2.0.0
171-
packaging==24.1
172-
pip==24.2
173-
pluggy==1.5.0
174-
psutil==6.0.0
175-
pyperf==2.6.1
176-
pytest==7.4.2
177-
PyYAML==6.0.1
178-
sh==2.0.6
17960

18061
[testenv:python313]
18162
basepython = /usr/local/bin/python3.13
182-
deps =
183-
iniconfig==2.0.0
184-
packaging==24.1
185-
pip==24.2
186-
pluggy==1.5.0
187-
psutil==6.0.0
188-
pyperf==2.7.0
189-
pytest==8.3.3
190-
PyYAML==6.0.2
191-
sh==2.0.7
19263

19364
[testenv:python314]
19465
basepython = /usr/local/bin/python3.14
195-
deps =
196-
iniconfig==2.1.0
197-
packaging==25.0
198-
pip==25.2
199-
pluggy==1.6.0
200-
Pygments==2.19.2
201-
pytest==8.4.1
202-
PyYAML==6.0.2
203-
sh==2.2.2
20466

20567
[testenv:pypy]
20668
basepython = /usr/bin/pypy
207-
deps =
208-
atomicwrites==1.4.1
209-
attrs==20.3.0
210-
backports.functools-lru-cache==1.6.6
211-
cffi==1.12.0
212-
configparser==4.0.2
213-
contextlib2==0.6.0.post1
214-
funcsigs==1.0.2
215-
greenlet==0.4.13
216-
importlib-metadata==2.1.3
217-
more-itertools==5.0.0
218-
pathlib2==2.3.7.post1
219-
pluggy==0.13.1
220-
py==1.11.0
221-
pytest==4.5.0
222-
PyYAML==5.1
223-
readline==6.2.4.1
224-
scandir==1.10.0
225-
sh==1.12.14
226-
six==1.16.0
227-
typing==3.10.0.0
228-
wcwidth==0.2.13
229-
zipp==1.2.0
23069

23170
[testenv:pypy3]
23271
basepython = /usr/bin/pypy3
233-
deps =
234-
atomicwrites==1.4.1
235-
attrs==20.3.0
236-
cffi==1.12.0
237-
greenlet==0.4.13
238-
importlib-metadata==2.1.3
239-
more-itertools==8.14.0
240-
pathlib2==2.3.7.post1
241-
pluggy==0.13.1
242-
py==1.11.0
243-
pytest==4.5.0
244-
PyYAML==5.1
245-
readline==6.2.4.1
246-
sh==1.12.14
247-
six==1.16.0
248-
wcwidth==0.2.13
249-
zipp==1.2.0

0 commit comments

Comments
 (0)