mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-18 07:36:34 -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
|
isolated_build = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = _PYTEST_SETUP_SKIP_APRSD_DEP=1
|
||||||
|
coverage: _APRSD_TOX_CMD=coverage run -m pytest
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install {opts} {packages}
|
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
|
-r{toxinidir}/dev-requirements.txt
|
||||||
|
pytestmain: git+https://github.com/pytest-dev/pytest.git@main
|
||||||
commands =
|
commands =
|
||||||
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
{env:_APRSD_TOX_CMD:pytest} {posargs}
|
||||||
# Use -Werror to treat warnings as errors.
|
coverage: coverage report -m
|
||||||
# {envpython} -bb -Werror -m pytest \
|
coverage: coverage xml
|
||||||
# --cov="{envsitepackagesdir}/aprsd" --cov-report=html --cov-report=term {posargs}
|
|
||||||
{envpython} -bb -m pytest {posargs}
|
[pytest]
|
||||||
|
minversion=2.0
|
||||||
|
testpaths = tests
|
||||||
|
#--pyargs --doctest-modules --ignore=.tox
|
||||||
|
addopts=-r a
|
||||||
|
filterwarnings =
|
||||||
|
error
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
@ -94,13 +104,13 @@ commands =
|
|||||||
|
|
||||||
[testenv:type-check]
|
[testenv:type-check]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
deps =
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/dev-requirements.txt
|
-r{toxinidir}/dev-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
mypy aprsd
|
mypy aprsd
|
||||||
|
|
||||||
[testenv:pre-commit]
|
[testenv:pre-commit]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
|
basepython = python3
|
||||||
deps = pre-commit
|
deps = pre-commit
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
commands = pre-commit run --all-files --show-diff-on-failure
|
||||||
|
Loading…
Reference in New Issue
Block a user