Skip to content

Commit

Permalink
Use pytest and friends in tox
Browse files Browse the repository at this point in the history
  • Loading branch information
hexchain committed Feb 19, 2022
1 parent da56ed7 commit c2a0405
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .coveragerc
Expand Up @@ -9,5 +9,6 @@ exclude_lines =
partial_branches =
pragma: no branch
for .*
omit =
.tox/*
include =
asyncssh/*
tests/*
43 changes: 34 additions & 9 deletions tox.ini
@@ -1,23 +1,48 @@
[tox]
envlist = {py36,py37,py38,py39,py310}-{linux,macos,windows}
minversion = 3.7
envlist = clean,{py36,py37,py38,py39,py310}-{linux,darwin,windows},report
skip_missing_interpreters = True

[testenv]
deps =
aiofiles>=0.6.0
bcrypt>=3.1.3
coverage
linux,macos: gssapi>=1.2.0
fido2>=0.9.2
libnacl>=1.4.2
pyOpenSSL>=17.0.0
python-pkcs11>=0.7.0
pytest>=7.0.1
pytest-cov>=3.0.0
setuptools>=18.5
linux,darwin: gssapi>=1.2.0
linux,darwin: python-pkcs11>=0.7.0
linux,darwin: uvloop>=0.9.1
windows: pywin32>=227
{py36,py37,py38,py39,py310}-{linux,macos}: uvloop>=0.9.1
platform =
linux: linux
macos: darwin
darwin: darwin
windows: win32
sitepackages = True
skip_missing_interpreters = True
usedevelop = True
setenv =
{py36,py37,py38,py39,py310}-{linux,darwin,windows}: COVERAGE_FILE = .coverage.{envname}
commands =
{envpython} -m pytest --cov --cov-report=term-missing:skip-covered {posargs}
depends =
{py36,py37,py38,py39,py310}-{linux,darwin,windows}: clean
report: {py36,py37,py38,py39,py310}-{linux,darwin,windows}

[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:report]
deps = coverage
skip_install = true
parallel_show_output = true
commands =
{envpython} -m coverage run -p -m unittest
coverage combine
coverage report --show-missing
coverage html

[pytest]
testpaths = tests

0 comments on commit c2a0405

Please sign in to comment.