Skip to content

Commit

Permalink
test: use testmon, also separate test and coverage (tarpas/pytest-tes…
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthergl committed Dec 7, 2023
1 parent 8a16015 commit c431896
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ testing =
setuptools
pytest
pytest-cov
pytest-testmon

[options.entry_points]
# Add here console scripts like:
Expand Down
25 changes: 25 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,31 @@ commands =
# https://tox.wiki/en/latest/config.html#substitutions-for-positional-arguments-in-commands
pytest {posargs}

# tox -e test
[testenv:test]
description = Invoke pytest to run automated tests, re-run only the failures
setenv =
TOXINIDIR = {toxinidir}
passenv =
HOME
SETUPTOOLS_*
extras =
testing
commands =
pytest --no-cov --testmon

# tox -e coverage
[testenv:coverage]
description = Invoke pytest to run automated tests, re-run only the failures
setenv =
TOXINIDIR = {toxinidir}
passenv =
HOME
SETUPTOOLS_*
extras =
testing
commands =
pytest -rFEx --durations 10 --color yes --cov=src/

# To run `tox -e lint` you need to make sure you have a
# `.pre-commit-config.yaml` file. See https://pre-commit.com
Expand Down

0 comments on commit c431896

Please sign in to comment.