[pypy-svn] r38483 - in pypy/dist/pypy: . tool/pytest

arigo at codespeak.net arigo at codespeak.net
Sun Feb 11 18:01:10 CET 2007


Author: arigo
Date: Sun Feb 11 18:01:08 2007
New Revision: 38483

Modified:
   pypy/dist/pypy/conftest.py
   pypy/dist/pypy/tool/pytest/appsupport.py
Log:
* Fix the code handling the failure of app-level tests (py lib API
  change).

* Make --pdb work somewhat (instead of crashing) for app-level tests.



Modified: pypy/dist/pypy/conftest.py
==============================================================================
--- pypy/dist/pypy/conftest.py	(original)
+++ pypy/dist/pypy/conftest.py	Sun Feb 11 18:01:08 2007
@@ -1,4 +1,5 @@
 import py, sys
+from py.__.test.outcome import Failed
 from pypy.interpreter.gateway import app2interp_temp
 from pypy.interpreter.error import OperationError
 from pypy.tool.pytest import appsupport
@@ -218,7 +219,7 @@
                 raise OpErrKeyboardInterrupt, OpErrKeyboardInterrupt(), tb
             appexcinfo = appsupport.AppExceptionInfo(space, e) 
             if appexcinfo.traceback: 
-                raise self.Failed(excinfo=appsupport.AppExceptionInfo(space, e))
+                raise Failed(excinfo=appsupport.AppExceptionInfo(space, e))
             raise 
 
 _pygame_imported = False

Modified: pypy/dist/pypy/tool/pytest/appsupport.py
==============================================================================
--- pypy/dist/pypy/tool/pytest/appsupport.py	(original)
+++ pypy/dist/pypy/tool/pytest/appsupport.py	Sun Feb 11 18:01:08 2007
@@ -65,6 +65,9 @@
         self.space = space
         self.operr = operr
         self.traceback = AppTraceback(space, self.operr.application_traceback)
+        debug_excs = getattr(operr, 'debug_excs', [])
+        if debug_excs:
+            self._excinfo = debug_excs[0]
 
     def exconly(self, tryshort=True): 
         return '(application-level) ' + self.operr.errorstr(self.space)



More information about the Pypy-commit mailing list