Re: [Zope-dev] zope.testing.doctest bug
Benji York wrote: For the forked doctest in zope.testing, the Zope 3 project's bug tracker in Launchpad would be appropriate. https://bugs.edge.launchpad.net/zope.testing/+bug/262578 I suspect Python's doctest has the same bug; checking that and reporting the bug to them would be good too. They may have already fixed it, if so we can copy their fix. They haven't fixed it, so submitted here too: http://bugs.python.org/issue3722 cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zope.testing.doctest bug
Hi All, Here's an example from a python interpretter session: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. def test(): ... print hello ... raise Exception() ... test() hello Traceback (most recent call last): File stdin, line 1, in ? File stdin, line 3, in test Exception ...which doesn't behave the same as a doctest: Failed example: test() Exception raised: Traceback (most recent call last): File zope.testing-3.6.0-py2.4.egg\zope\te sting\doctest.py, line 1356, in __run File doctest readme.txt[8], line 1, in ? test() File doctest readme.txt[7], line 3, in test raise Exception() Exception The problem is that the function prints output before raising the exception. If I take the printed output away, the doctest passes fine. However, especially with dumym fixtures common in doctests, that printed output needs to be seen to test that things are happening as they should prior to the exception being raised. Where should I log this bug? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing.doctest bug
On Thu, Aug 28, 2008 at 6:35 AM, Chris Withers [EMAIL PROTECTED] wrote: The problem is that the function prints output before raising the exception. If I take the printed output away, the doctest passes fine. However, especially with dumym fixtures common in doctests, that printed output needs to be seen to test that things are happening as they should prior to the exception being raised. For the forked doctest in zope.testing, the Zope 3 project's bug tracker in Launchpad would be appropriate. I suspect Python's doctest has the same bug; checking that and reporting the bug to them would be good too. They may have already fixed it, if so we can copy their fix. -- Benji York Senior Software Engineer Zope Corporation ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )