[Zope-dev] zope.testing.testrunner.find.find_suites molests exc_info

Chris Withers chris at simplistix.co.uk
Tue Aug 11 08:48:51 EDT 2009


Hi Christian,

In trying to debug this:

Chris Withers wrote:
> $ bin/test -D
> Traceback (most recent call last):
>    File "bin/test", line 28, in <module>
> <snip>
> "/home/chris/buildout-eggs/zope.testing-3.8.0-py2.6.egg/zope/testing/testrunner/find.py", 
> line 95, in __init__
>      raise TypeError('If post_mortem is specified, '
> TypeError: If post_mortem is specified, full exc_info must be passed!

...I discovered that the exc_info is being cut to bits in find_suites:

except:
     suite = StartUpFailure(
         options, module_name, sys.exc_info()[:2]+(None,))

...which svn blame attributes to you. Any idea why this is being done?

Changing the above to:

                         suite = StartUpFailure(
                             options, module_name, sys.exc_info())

...appears to have no effect other than making post mortem debugging 
work and actually showing the traceback when the exception occurs, which 
both seem like a good thing to me.

Can you or anyone else shed some light on this?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-Dev mailing list