From 146f61b396590ebd68f3250a89c6fd63c66b3d3d Mon Sep 17 00:00:00 2001 From: Thomas Carmet <8408330+tcarmet@users.noreply.github.com> Date: Mon, 14 Oct 2024 19:48:27 +0000 Subject: [PATCH] Configure pytest and tests tree for coverage --- bert_e/tests/unit/__init__.py | 0 tox.ini | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 bert_e/tests/unit/__init__.py diff --git a/bert_e/tests/unit/__init__.py b/bert_e/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tox.ini b/tox.ini index 8d57c01e..4b09b220 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,11 @@ [coverage:run] omit = .tox/* +[pytest] +addopts = --cov=bert_e --cov-report=term --cov-report=xml +testpaths = bert_e/tests + + [testenv] basepython = python3 deps = -r{toxinidir}/requirements.txt @@ -15,19 +20,19 @@ commands = flake8 bert_e/ deps = pip==22.3.1 pytest-cov==5.0.0 -commands = pytest bert_e/tests/unit/ --cov=bert_e --cov-report=xml {posargs} +commands = pytest bert_e/tests/unit/ {posargs} [testenv:tests-api-mock] deps = pip==22.3.1 pytest-cov==5.0.0 -commands = pytest -v -k mock bert_e/tests/test_git_host.py --cov=bert_e --cov-report=xml {posargs} +commands = pytest -v -k mock bert_e/tests/test_git_host.py {posargs} [testenv:tests-server] deps = pip==22.3.1 pytest-cov==5.0.0 -commands = pytest bert_e/tests/test_server.py --cov=bert_e --cov-report=xml {posargs} +commands = pytest bert_e/tests/test_server.py {posargs} [testenv:tests-noqueue] deps =