Skip to content

Commit c7b1541

Browse files
committed
Use pytest and friends in tox
1 parent 30b7fc1 commit c7b1541

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ partial_branches =
1111
for .*
1212
omit =
1313
.tox/*
14+
tests/*

tox.ini

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
[tox]
2-
envlist = {py36,py37,py38,py39,py310}-{linux,macos,windows}
2+
minversion = 2.0
3+
envlist = clean,{py36,py37,py38,py39,py310}-{linux,darwin,windows},report
4+
skip_missing_interpreters = True
35

46
[testenv]
57
deps =
8+
aiofiles
69
bcrypt>=3.1.3
7-
coverage
8-
linux,macos: gssapi>=1.2.0
10+
fido2>=0.9.2
911
libnacl>=1.4.2
1012
pyOpenSSL>=17.0.0
11-
python-pkcs11>=0.7.0
13+
pytest
14+
pytest-cov
15+
pytest-xdist
1216
setuptools>=18.5
17+
linux,darwin: gssapi>=1.2.0
18+
linux,darwin: python-pkcs11>=0.7.0
19+
linux,darwin: uvloop>=0.9.1
1320
windows: pywin32>=227
14-
{py36,py37,py38,py39,py310}-{linux,macos}: uvloop>=0.9.1
1521
platform =
1622
linux: linux
17-
macos: darwin
23+
darwin: darwin
1824
windows: win32
19-
sitepackages = True
20-
skip_missing_interpreters = True
2125
usedevelop = True
2226
commands =
23-
{envpython} -m coverage run -p -m unittest
27+
{envpython} -m pytest --cov --cov-append -n auto {posargs}
28+
depends =
29+
{py36,py37,py38,py39,py310}-{linux,darwin,windows}: clean
30+
report: {py36,py37,py38,py39,py310}-{linux,darwin,windows}
31+
32+
[testenv:clean]
33+
deps = coverage
34+
skip_install = true
35+
commands = coverage erase
36+
37+
[testenv:report]
38+
deps = coverage
39+
skip_install = true
40+
commands =
41+
coverage report --show-missing
42+
coverage html
43+
44+
[pytest]
45+
testpaths = tests

0 commit comments

Comments
 (0)