Skip to content

Commit c2a0405

Browse files
committed
Use pytest and friends in tox
1 parent da56ed7 commit c2a0405

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

.coveragerc

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ exclude_lines =
99
partial_branches =
1010
pragma: no branch
1111
for .*
12-
omit =
13-
.tox/*
12+
include =
13+
asyncssh/*
14+
tests/*

tox.ini

+34-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,48 @@
11
[tox]
2-
envlist = {py36,py37,py38,py39,py310}-{linux,macos,windows}
2+
minversion = 3.7
3+
envlist = clean,{py36,py37,py38,py39,py310}-{linux,darwin,windows},report
4+
skip_missing_interpreters = True
35

46
[testenv]
57
deps =
8+
aiofiles>=0.6.0
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>=7.0.1
14+
pytest-cov>=3.0.0
1215
setuptools>=18.5
16+
linux,darwin: gssapi>=1.2.0
17+
linux,darwin: python-pkcs11>=0.7.0
18+
linux,darwin: uvloop>=0.9.1
1319
windows: pywin32>=227
14-
{py36,py37,py38,py39,py310}-{linux,macos}: uvloop>=0.9.1
1520
platform =
1621
linux: linux
17-
macos: darwin
22+
darwin: darwin
1823
windows: win32
19-
sitepackages = True
20-
skip_missing_interpreters = True
2124
usedevelop = True
25+
setenv =
26+
{py36,py37,py38,py39,py310}-{linux,darwin,windows}: COVERAGE_FILE = .coverage.{envname}
27+
commands =
28+
{envpython} -m pytest --cov --cov-report=term-missing:skip-covered {posargs}
29+
depends =
30+
{py36,py37,py38,py39,py310}-{linux,darwin,windows}: clean
31+
report: {py36,py37,py38,py39,py310}-{linux,darwin,windows}
32+
33+
[testenv:clean]
34+
deps = coverage
35+
skip_install = true
36+
commands = coverage erase
37+
38+
[testenv:report]
39+
deps = coverage
40+
skip_install = true
41+
parallel_show_output = true
2242
commands =
23-
{envpython} -m coverage run -p -m unittest
43+
coverage combine
44+
coverage report --show-missing
45+
coverage html
46+
47+
[pytest]
48+
testpaths = tests

0 commit comments

Comments
 (0)