From fa089ae5835551ac904b4ce3916010953aeeafab Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 22 Mar 2008 20:47:27 +0000 Subject: [PATCH] Add note about blank lines in doctest blocks. --- doc/ext/doctest.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/ext/doctest.rst b/doc/ext/doctest.rst index 77304abd3..6a2839199 100644 --- a/doc/ext/doctest.rst +++ b/doc/ext/doctest.rst @@ -157,12 +157,12 @@ There are also these config values for customizing the doctest extension: recognizes it from the leading ``>>>``. Also, no additional indentation is necessary, though it doesn't hurt.) - If this value is true, the above snippet is interpreted by the doctest - builder exactly like the following:: + If this value is left at its default value, the above snippet is interpreted + by the doctest builder exactly like the following:: Some documentation text. - .. doctest:: doctest_block + .. doctest:: >>> print 1 1 @@ -172,3 +172,6 @@ There are also these config values for customizing the doctest extension: This feature makes it easy for you to test doctests in docstrings included with the :mod:`~sphinx.ext.autodoc` extension without marking them up with a special directive. + + Note though that you can't have blank lines in reST doctest blocks. They + will be interpreted as one block ending and another one starting.