[pytest]
markers = datafiles
-addopts = -p no:warnings
+addopts =
+ -p no:warnings
+ --cov=lftools
+ --cov-report=term-missing
[testenv]
basepython = python3
-deps = -r{toxinidir}/requirements-test.txt
+# This needs to mirror the test section of pyproject.toml
+deps =
+ pytest==5.3.5
+ pytest-click==0.3
+ pytest-cov
+ pytest-datafiles==2.0
+ pytest-mock==2.0.0
+ pytest-responses==0.4.0
+
commands = pytest
usedevelop = true
[testenv:docs]
description = Build the documentation with sphinx
-basepython = python3
-deps = -rrequirements-docs.txt
+basepython = python3.8
+# This needs to mirror the docs section of pyproject.toml plus the testenv
+deps =
+ {[testenv]deps}
+ lfdocs-conf
+ reno
+ sphinxcontrib-programoutput
+
extras = openstack
commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
[testenv:docs-linkcheck]
description = Check the documentation links with sphinx
-basepython = python3
-deps = -rrequirements-docs.txt
+basepython = python3.8
+deps =
+ {[testenv:docs]deps}
extras = openstack
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
[testenv:latest-upstream]
description = Latest upstream test. Used for what exactly?
basepython = python3
-deps = -r{toxinidir}/requirements-test.txt
+deps =
+ {[testenv:docs]deps}
commands =
pip install -U python-jenkins requests
pytest
[testenv:license]
description = Check all files for license header
-basepython = python3
+basepython = python3.8
deps = lftools
commands =
lftools license check-dir lftools
[testenv:pre-commit]
description = Precommit checks for black, gitlint, etc.
-basepython = python3.7
+basepython = python3.8
allowlist_externals =
/bin/sh
deps =