aboutsummaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2013-01-25 17:38:21 +0100
committerArmin Rigo <arigo@tunes.org>2013-01-25 17:38:21 +0100
commit9b4e3649e2c8c03420b531633c24c67667d0b875 (patch)
treef28032440e7b44d828cd723745a2ca7d940a941b /py
parentrewrite list inplace mul in terms of ll_arraycopy, less code and probably faster (diff)
downloadpypy-9b4e3649e2c8c03420b531633c24c67667d0b875.tar.gz
pypy-9b4e3649e2c8c03420b531633c24c67667d0b875.tar.bz2
pypy-9b4e3649e2c8c03420b531633c24c67667d0b875.zip
Add a quick hack to prevent py.test from taking forever to display certain
tracebacks.
Diffstat (limited to 'py')
-rw-r--r--py/_code/source.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/_code/source.py b/py/_code/source.py
index 12f6b1aec7..94c5da7f66 100644
--- a/py/_code/source.py
+++ b/py/_code/source.py
@@ -141,6 +141,8 @@ class Source(object):
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