nose-devs/nose — Issue #98: [PATCH] More resilient traceback handling
Author: jpellerin
Created: 2011-12-14 15:59:10+00:00
State: open

I somehow managed to have a traceback created where some code object's co_filename was an
invalid file (I can't remember how, sorry for not having a test)

Anyway nose.inspector isn't correctly handling this case: when inspect.findsource raises an IOError
(due to an invalid filename). In inspect_traceback, we end up with lines and exc_line values both
being None, whereas find_inspectable_lines expects them to be a list and an integer.

The following patch changes them to default to [''], 0 in this case so find_inspectable_lines can
safely return nothing

Patch is against trunk r586

Google Code Info:
Issue #: 236
Author: pjenvey%...@gtempaccount.com
Created On: 2009-02-21T03:48:44.000Z
Closed On: 2009-02-21T17:52:52.000Z