[py-svn] r58775 - in py/trunk/py/code: . testing
hpk at codespeak.net
hpk at codespeak.net
Tue Oct 7 17:44:57 CEST 2008
Author: hpk
Date: Tue Oct 7 17:44:56 2008
New Revision: 58775
Modified:
py/trunk/py/code/excinfo.py
py/trunk/py/code/testing/test_excinfo.py
Log:
only check for Recursion if we have a RuntimeError
Modified: py/trunk/py/code/excinfo.py
==============================================================================
--- py/trunk/py/code/excinfo.py (original)
+++ py/trunk/py/code/excinfo.py Tue Oct 7 17:44:56 2008
@@ -194,7 +194,9 @@
traceback = excinfo.traceback
if self.tbfilter:
traceback = traceback.filter()
- recursionindex = traceback.recursionindex()
+ recursionindex = None
+ if excinfo.errisinstance(RuntimeError):
+ recursionindex = traceback.recursionindex()
last = traceback[-1]
entries = []
extraline = None
Modified: py/trunk/py/code/testing/test_excinfo.py
==============================================================================
--- py/trunk/py/code/testing/test_excinfo.py (original)
+++ py/trunk/py/code/testing/test_excinfo.py Tue Oct 7 17:44:56 2008
@@ -351,6 +351,8 @@
def exconly(self, tryshort):
return "EXC"
+ def errisinstance(self, cls):
+ return False
excinfo = FakeExcinfo()
class FakeRawTB(object):
More information about the pytest-commit
mailing list