Ensure tests are actually run

pytest by default only discovers tests in files named test_*.py,
so none of the tests were actually being executed. Set the appropriate
pytest option
to discover the tests so they are automatically run.
This commit is contained in:
Peter Marheine 2024-07-30 11:46:17 +00:00
parent 71488c49c4
commit e2b4470c5b

View file

@ -31,10 +31,10 @@ deps =
commands =
pip install -e .
pip install -e demo
# doctests
# doctests and unit tests
pytest --cov=django_downloadview --cov=demoproject {posargs}
# all other test cases
coverage run --append {envbindir}/demo test {posargs: tests demoproject}
# demo project integration tests
coverage run --append {envbindir}/demo test {posargs: demoproject}
coverage xml
pip freeze
ignore_outcome =
@ -76,3 +76,4 @@ source = django_downloadview,demo
[pytest]
DJANGO_SETTINGS_MODULE = demoproject.settings
addopts = --doctest-modules --ignore=docs/
python_files = tests/*.py