aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-11-19 21:17:35 +0100
committerArmin Rigo <arigo@tunes.org>2016-11-19 21:17:35 +0100
commitec7ddfa3cb24c852c4c40eb21f24ca1eb1a82333 (patch)
tree4b28327108ba3d8129e4546bf733c5b5663f23f9 /_pytest
parentAnother case of @jit.call_shortcut: tests that are directly "if x is not (diff)
downloadpypy-ec7ddfa3cb24c852c4c40eb21f24ca1eb1a82333.tar.gz
pypy-ec7ddfa3cb24c852c4c40eb21f24ca1eb1a82333.tar.bz2
pypy-ec7ddfa3cb24c852c4c40eb21f24ca1eb1a82333.zip
Reapply fix c6f52c21fe7e
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/_code/source.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/_pytest/_code/source.py b/_pytest/_code/source.py
index a1521f8a21..8bb3e45825 100644
--- a/_pytest/_code/source.py
+++ b/_pytest/_code/source.py
@@ -416,6 +416,8 @@ def getstatementrange_old(lineno, source, assertion=False):
trysource = source[start:end]
if trysource.isparseable():
return start, end
+ if end == start + 100: # XXX otherwise, it takes forever
+ break # XXX
raise SyntaxError("no valid source range around line %d " % (lineno,))