Message215796
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. |
|
Date |
User |
Action |
Args |
2014-04-09 02:13:51 | osantana | set | recipients:
+ osantana |
2014-04-09 02:13:51 | osantana | set | messageid: <1397009631.06.0.545133190838.issue21183@psf.upfronthosting.co.za> |
2014-04-09 02:13:50 | osantana | link | issue21183 messages |
2014-04-09 02:13:50 | osantana | create | |
|