Commits

Armin Rigo committed dc81116

Add a quick hack to prevent py.test from taking forever to display certain
tracebacks.

  • Participants
  • Parent commits 1d664ad

Comments (0)

Files changed (1)

py/_code/source.py

                 trysource = self[start:end]
                 if trysource.isparseable():
                     return start, end
+                if end == start + 100:   # XXX otherwise, it takes forever
+                    break                # XXX
         if end is None:
             raise IndexError("no valid source range around line %d " % (lineno,))
         return start, end