Add test documentation for docs tox target
Enable sphinx to generate documentation from docstrings by running
'tox -e docs'.
Change-Id: I5996e5f07493f69f14172b4bb0535852e89d5456
diff --git a/tox.ini b/tox.ini
index c2fc078..2f7da5c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -40,8 +40,15 @@
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
-commands = sphinx-build -W -b html doc/source doc/build/html
+commands =
+ rm -rf doc/source/tests
+ sphinx-apidoc -f -o doc/source/tests neutron_tempest_plugin
+ rm -rf doc/build
+ sphinx-build -W -b html doc/source doc/build/html
+allowlist_externals =
+ rm
[testenv:releasenotes]
deps = {[testenv:docs]deps}