Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: simplify doctest execution #99

Closed
tiborsimko opened this issue Mar 14, 2017 · 0 comments · Fixed by #100
Closed

tests: simplify doctest execution #99

tiborsimko opened this issue Mar 14, 2017 · 0 comments · Fixed by #100
Assignees
Milestone

Comments

@tiborsimko
Copy link
Member

The following cookiecutter change:

inveniosoftware/cookiecutter-invenio-module#98

should be propagated to this Invenio module.

Namely, in run-tests.sh, the sphinx for doctests is invoked after pytest run:

$ 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
inveniosoftware/invenio-marc21#49 (comment))
and that was integrated in cookiecutter (see
inveniosoftware/cookiecutter-invenio-module#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
inveniosoftware/invenio-marc21@09e98fc).

@tiborsimko tiborsimko added this to the v1.0.0 milestone Mar 14, 2017
@lnielsen lnielsen modified the milestones: v1.0.0, someday May 12, 2017
egabancho added a commit to egabancho/invenio-theme that referenced this issue May 15, 2017
* doctests are now executed with pytest instead of sphinx. (closes inveniosoftware#99)

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
@egabancho egabancho self-assigned this May 15, 2017
lnielsen pushed a commit that referenced this issue May 15, 2017
* doctests are now executed with pytest instead of sphinx. (closes #99)

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants