On Thu, Jul 21, 2011 at 7:19 PM, phil_stephens <phil.stp...@gmail.com> wrote:
> We're running the sphinx doctest extension against our user tutorials,
> and getting two test failures that do not appear to be failures at
> all.

Could there be a difference in whitespace between the expected and received
output?

If this is the case, doctest can be configured to ignore differences in
whitespace via the NORMALIZE_WHITESPACE flag.  For example:

    >>> print ' a     b     c '  # doctest: +NORMALIZE_WHITESPACE
    a b c

You can also use the :options: option after a doctest directive to specify
flags.  The following is similar to the previous example but has the added
benefit of preventing the flag from appearing in generated documents.

    .. doctest::
       :options: +NORMALIZE_WHITESPACE

       >>> print ' a     b     c '
       a b c

cheers,
Jonathan Waltman

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to