From 9787a407b700f18dadfb4153b3ba1375a615b73c Mon Sep 17 00:00:00 2001 From: Nejc Habjan Date: Sun, 23 Feb 2020 20:49:33 +0100 Subject: chore: use pytest for unit tests and coverage --- tox.ini | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 92d227d..f721ebc 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --testr-args='{posargs}' + pytest gitlab/tests {posargs} [testenv:pep8] commands = @@ -40,9 +40,11 @@ commands = python setup.py build_sphinx [testenv:cover] commands = - python setup.py testr --slowest --coverage --testr-args="{posargs}" - coverage report --omit=*tests* - coverage html --omit=*tests* + pytest --cov gitlab --cov-report term --cov-report html \ + --cov-report xml gitlab/tests {posargs} + +[coverage:run] +omit = *tests* [testenv:cli_func_v4] commands = {toxinidir}/tools/functional_tests.sh -a 4 -- cgit v1.2.1