[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- resolution: invalid -> stage: -> needs patch status: closed -> open type: behavior -> enhancement versions: +Python 3.5 -Python 2.7, Python 3.4 ___ Python tracker _

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Tim Peters
Tim Peters added the comment: Steven, no objection here. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: Personally, I think that the second reason given in the footnote, that it makes for confusing tests, is bogus, or at least it's a matter of opinion. I for one don't think they are confusing, and would like to see mixed output/tracebacks supported. Tim, would

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: Hi Tim, I tried to find more information in documentation before opening this bug but I need to confess that I didn't read the footnote. Thanks and sorry for the invalid report. -- resolution: -> invalid status: open -> closed

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Tim Peters
Tim Peters added the comment: The first footnote in the docs explain this: Examples containing both expected output and an exception are not supported. Trying to guess where one ends and the other begins is too error-prone, and that also makes for a confusing test. So, sorry, bu

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Osvaldo Santana Neto
New submission from Osvaldo Santana Neto: 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: