[pypy-svn] r46736 - pypy/dist/pypy/tool/pytest

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Sep 19 17:04:56 CEST 2007


Author: cfbolz
Date: Wed Sep 19 17:04:54 2007
New Revision: 46736

Modified:
   pypy/dist/pypy/tool/pytest/appsupport.py
Log:
issue319 resolved
make the fake AppCode behave a bit more like py.code.Code to make py.test happy
when --tb=short is used.


Modified: pypy/dist/pypy/tool/pytest/appsupport.py
==============================================================================
--- pypy/dist/pypy/tool/pytest/appsupport.py	(original)
+++ pypy/dist/pypy/tool/pytest/appsupport.py	Wed Sep 19 17:04:54 2007
@@ -10,7 +10,8 @@
 
 class AppCode(object):
     def __init__(self, space, pycode):
-        self.code = space.unwrap(space.getattr(pycode, space.wrap('co_code')))
+        self.code == space.unwrap(space.getattr(pycode, space.wrap('co_code')))
+        self.raw = self.code
         self.w_file = space.getattr(pycode, space.wrap('co_filename'))
         self.name = space.getattr(pycode, space.wrap('co_name'))
         self.firstlineno = space.unwrap(space.getattr(pycode, space.wrap('co_firstlineno')))



More information about the Pypy-commit mailing list