Skip to content

Commit

Permalink
Configure pytest and tests tree for coverage (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Oct 14, 2024
1 parent 7527ea0 commit 3e76d46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Empty file added bert_e/tests/unit/__init__.py
Empty file.
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit 3e76d46

Please sign in to comment.