wsme/tox.ini
Stephen Finucane e392656946 tests: Migrate to pytest
nose is not compatible with Python 3.10 or later and stestr can't handle
multiple test directories nor test directories that are not importable
modules.

While here, we also fix the case for two other dependencies to prevent
test failures. We also update the tox file to reflect modern best
practices.

Change-Id: Ie7b57b1f34957459793bcaa5253ce1b446e36336
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-07 11:09:28 +01:00

36 lines
845 B
INI

[tox]
minversion = 3.1
envlist = py3,coverage,pep8
[testenv]
deps =
-r test-requirements.txt
commands =
pytest wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py
[testenv:coverage]
commands =
coverage erase
pytest --cov=wsme --cov=wsme_ext wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py
coverage combine
coverage xml --include="wsme/*.py","wsme/rest/*.py","wsmeext/*.py" --omit "wsme/tests/*"
coverage report --show-missing --include="wsme/*.py","wsme/rest/*.py","wsmeext/*.py" --omit "wsme/tests/*"
[testenv:docs]
allowlist_externals =
rm
deps =
-r doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html
[testenv:pep8]
deps = flake8
commands =
flake8 wsme wsmeext setup.py
[testenv:venv]
usedevelop = True
commands = {posargs}