[py-svn] r45484 - py/trunk/py/code
fijal at codespeak.net
fijal at codespeak.net
Sat Aug 4 16:24:56 CEST 2007
Author: fijal
Date: Sat Aug 4 16:24:56 2007
New Revision: 45484
Modified:
py/trunk/py/code/traceback2.py
Log:
A comment why this will not work on different python version
Modified: py/trunk/py/code/traceback2.py
==============================================================================
--- py/trunk/py/code/traceback2.py (original)
+++ py/trunk/py/code/traceback2.py Sat Aug 4 16:24:56 2007
@@ -1,5 +1,6 @@
from __future__ import generators
-import py
+import py
+import sys
class TracebackEntry(object):
""" a single entry in a traceback """
@@ -9,6 +10,9 @@
def __init__(self, rawentry):
self._rawentry = rawentry
self.frame = py.code.Frame(rawentry.tb_frame)
+ # Ugh. 2.4 and 2.5 differs here when encountering
+ # multi-line statements. Not sure about the solution, but
+ # should be portable
self.lineno = rawentry.tb_lineno - 1
self.relline = self.lineno - self.frame.code.firstlineno
More information about the pytest-commit
mailing list