scipy / scipy_doctest

Floating-point aware doctesting
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

allow running the plugin on rst tutorials #130

Closed ev-br closed 6 months ago

ev-br commented 6 months ago

Currently, $ pytest --doctest-modules --collect only docs/source/tutorial reports 0 items collected but pop up a bunch of MPL figures. So, something pytest-y or doctest-y sneaks in, imports and runs examples. A breakpoint in a Runner.run does not get hit --- makes sense if 0 items are collected. A breakpoint in DTTextfile.collect does not get hit either.

ev-br commented 6 months ago

MPL figures are.py files in the examples/ folder. They (at least some of them) get included into code-blocks in rst, so need the folder needs to be excluded

ev-br commented 6 months ago

Further hiccup: $ pytest doc/source/tutorials --doctest-modules does not find the conftest.py --- the conftest.py lives in scipy/scipy and the docs are in scipy/docs/tutorial. We thus only get a default DTConfig instance from scpdt itself.

EDIT: seems to be solved by adding a conftest.py to doc/source/tutorial ?