[py-svn] r33020 - py/dist/py/code
arigo at codespeak.net
arigo at codespeak.net
Sun Oct 8 23:08:32 CEST 2006
Author: arigo
Date: Sun Oct 8 23:08:31 2006
New Revision: 33020
Modified:
py/dist/py/code/traceback2.py
Log:
Oups oups oups! Forgot to check this file in.
Modified: py/dist/py/code/traceback2.py
==============================================================================
--- py/dist/py/code/traceback2.py (original)
+++ py/dist/py/code/traceback2.py Sun Oct 8 23:08:31 2006
@@ -34,10 +34,14 @@
self.exprinfo = x
return self.exprinfo
+ def getfirstlinesource(self):
+ return self.frame.code.firstlineno
+
def getsource(self):
""" return failing source code. """
source = self.frame.code.fullsource
- start, end = self.frame.code.firstlineno, self.lineno
+ start = self.getfirstlinesource()
+ end = self.lineno
try:
_, end = source.getstatementrange(end)
except IndexError:
More information about the pytest-commit
mailing list