Skip to content

Commit a47a222

Browse files
committed
Use pytest and friends in tox
1 parent 9a38cb7 commit a47a222

File tree

1 file changed

+35
-13
lines changed

1 file changed

+35
-13
lines changed

tox.ini

Lines changed: 35 additions & 13 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,py3{6,7,8,9,10},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
11+
gssapi>=1.2.0 ; sys.platform != 'win32'
912
libnacl>=1.4.2
1013
pyOpenSSL>=17.0.0
11-
python-pkcs11>=0.7.0
14+
pytest
15+
pytest-cov
16+
pytest-timeout
17+
pytest-xdist
18+
python-pkcs11>=0.7.0 ; sys.platform != 'win32'
19+
pywin32>=227 ; sys.platform == 'win32'
1220
setuptools>=18.5
13-
windows: pywin32>=227
14-
{py36,py37,py38,py39,py310}-{linux,macos}: uvloop>=0.9.1
15-
platform =
16-
linux: linux
17-
macos: darwin
18-
windows: win32
19-
sitepackages = True
20-
skip_missing_interpreters = True
21+
uvloop>=0.9.1 ; sys.platform != 'win32'
2122
usedevelop = True
23+
setenv =
24+
py3{6,7,8,9,10}: COVERAGE_FILE = .coverage.{envname}
25+
commands =
26+
{envpython} -m pytest --cov --cov-report=term-missing:skip-covered --durations 10 --timeout 300 -n auto {posargs}
27+
depends =
28+
py3{6,7,8,9,10}: clean
29+
report: py3{6,7,8,9,10}
30+
31+
[testenv:clean]
32+
deps = coverage
33+
skip_install = true
34+
commands = coverage erase
35+
36+
[testenv:report]
37+
deps = coverage
38+
skip_install = true
2239
commands =
23-
{envpython} -m coverage run -p -m unittest
40+
coverage combine
41+
coverage html
42+
coverage report --show-missing
43+
44+
[tool:pytest]
45+
testpaths = tests

0 commit comments

Comments
 (0)