You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've been working with .. doctest:: for a while now and some snippets are a little too long to be comfortably put in the documentation.
Naturally there are unit tests but sometimes (mostly for demonstrating benchmarks) it is desirable to have a class or something defined over multiple lines with sensitive indentation be part of the doctest.
Currently this means carefully editing it in a .py file and then putting it in the rst.
Describe the solution you'd like
Allow .. include:: to work with .. doctest::
Describe alternatives you've considered
Doug Hellmann has a rather involved alternative using cogdiscussed here but I'd rather not go that far.
Additional context
The motivating context is this NumPy document which had an indent bug preventing us from doctests.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I've been working with
.. doctest::
for a while now and some snippets are a little too long to be comfortably put in the documentation.Naturally there are unit tests but sometimes (mostly for demonstrating benchmarks) it is desirable to have a class or something defined over multiple lines with sensitive indentation be part of the doctest.
Currently this means carefully editing it in a
.py
file and then putting it in therst
.Describe the solution you'd like
Allow
.. include::
to work with.. doctest::
Describe alternatives you've considered
Doug Hellmann has a rather involved alternative using
cog
discussed here but I'd rather not go that far.Additional context
The motivating context is this NumPy document which had an indent bug preventing us from doctests.
The text was updated successfully, but these errors were encountered: