This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author osantana
Recipients osantana
Date 2014-04-09.02:13:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397009631.06.0.545133190838.issue21183@psf.upfronthosting.co.za>
In-reply-to
Content
The following doctest should pass, but it fails:

    >>> def spam(): print("eggs")
    ...
    >>> assert spam()
    eggs
    Traceback (most recent call last):
    AssertionError

But if we remove the print output from printed results the test pass:

    >>> def spam(): print("eggs")
    ...
    >>> assert spam()
    Traceback (most recent call last):
    AssertionError

I'm writing the 2nd edition of a book about Python (covering python3) and Django and I'm using doctest to run the interactive sessions that I use as examples in book.
History
Date User Action Args
2014-04-09 02:13:51osantanasetrecipients: + osantana
2014-04-09 02:13:51osantanasetmessageid: <1397009631.06.0.545133190838.issue21183@psf.upfronthosting.co.za>
2014-04-09 02:13:50osantanalinkissue21183 messages
2014-04-09 02:13:50osantanacreate