Closed tiborsimko closed 6 years ago
The following cookiecutter change:
https://github.com/inveniosoftware/cookiecutter-invenio-module/pull/98
should be propagated to this Invenio module.
Namely, in run-tests.sh, the sphinx for doctests is invoked after pytest run:
run-tests.sh
$ tail -3 ./\{\{\ cookiecutter.project_shortname\ \}\}/run-tests.sh sphinx-build -qnNW docs docs/_build/html && python setup.py test && sphinx-build -qnNW -b doctest docs docs/_build/doctest
This sometimes led to problems on Travis CI with the second sphinx-build run due to "disappearing" dependencies after the example application was tested.
A solution that worked for invenio-marc21 (see https://github.com/inveniosoftware/invenio-marc21/pull/49#issuecomment-281287103) and that was integrated in cookiecutter (see https://github.com/inveniosoftware/cookiecutter-invenio-module/pull/98) was to run doctest execution in pytest, removing the second sphinx-build invocation.
sphinx-build
This both solved Travis CI build failures and simplified test suite execution.
Note that this change may necessitate to amend the code tests etc so that things would be executed with the Flask application context (see https://github.com/inveniosoftware/invenio-marc21/pull/49/commits/09e98fc18fd5591dc65d806286e8da51b7e384b4).
The following cookiecutter change:
https://github.com/inveniosoftware/cookiecutter-invenio-module/pull/98
should be propagated to this Invenio module.
Namely, in
run-tests.sh
, the sphinx for doctests is invoked after pytest run:This sometimes led to problems on Travis CI with the second sphinx-build run due to "disappearing" dependencies after the example application was tested.
A solution that worked for invenio-marc21 (see https://github.com/inveniosoftware/invenio-marc21/pull/49#issuecomment-281287103) and that was integrated in cookiecutter (see https://github.com/inveniosoftware/cookiecutter-invenio-module/pull/98) was to run doctest execution in pytest, removing the second
sphinx-build
invocation.This both solved Travis CI build failures and simplified test suite execution.
Note that this change may necessitate to amend the code tests etc so that things would be executed with the Flask application context (see https://github.com/inveniosoftware/invenio-marc21/pull/49/commits/09e98fc18fd5591dc65d806286e8da51b7e384b4).