mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-17 23:29:17 -05:00
Updated tox.ini
this patch updates tox.ini to support coverage tests.
This commit is contained in:
parent
f1f8aed8c4
commit
d6643a8e96
14
.coveragerc
Normal file
14
.coveragerc
Normal file
@ -0,0 +1,14 @@
|
||||
[run]
|
||||
include =
|
||||
aprsd/*
|
||||
tests/*
|
||||
*/lib/python*/site-packages/aprsd/*
|
||||
*/pypy*/site-packages/aprsd/*
|
||||
*\Lib\site-packages\aprsd\*
|
||||
branch = 1
|
||||
|
||||
[paths]
|
||||
source = aprsd/
|
||||
*/lib/python*/site-packages/aprsd/
|
||||
*/pypy*/site-packages/aprsd/
|
||||
*\Lib\site-packages\aprsd\
|
28
tox.ini
28
tox.ini
@ -10,17 +10,27 @@ envlist = pre-commit,pep8,fmt-check,py{36,37,38}
|
||||
isolated_build = true
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
setenv = _PYTEST_SETUP_SKIP_APRSD_DEP=1
|
||||
coverage: _APRSD_TOX_CMD=coverage run -m pytest
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
extras = tests
|
||||
deps = coverage: coverage
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
pytestmain: git+https://github.com/pytest-dev/pytest.git@main
|
||||
commands =
|
||||
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
||||
# Use -Werror to treat warnings as errors.
|
||||
# {envpython} -bb -Werror -m pytest \
|
||||
# --cov="{envsitepackagesdir}/aprsd" --cov-report=html --cov-report=term {posargs}
|
||||
{envpython} -bb -m pytest {posargs}
|
||||
{env:_APRSD_TOX_CMD:pytest} {posargs}
|
||||
coverage: coverage report -m
|
||||
coverage: coverage xml
|
||||
|
||||
[pytest]
|
||||
minversion=2.0
|
||||
testpaths = tests
|
||||
#--pyargs --doctest-modules --ignore=.tox
|
||||
addopts=-r a
|
||||
filterwarnings =
|
||||
error
|
||||
|
||||
[testenv:docs]
|
||||
skip_install = true
|
||||
@ -94,13 +104,13 @@ commands =
|
||||
|
||||
[testenv:type-check]
|
||||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
commands =
|
||||
mypy aprsd
|
||||
|
||||
[testenv:pre-commit]
|
||||
skip_install = true
|
||||
basepython = python3
|
||||
deps = pre-commit
|
||||
commands = pre-commit run --all-files --show-diff-on-failure
|
||||
|
Loading…
Reference in New Issue
Block a user