[pypy-svn] r69383 - in pypy/branch/faster-raise/pypy/interpreter: . test
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 18 16:39:08 CET 2009
Author: arigo
Date: Wed Nov 18 16:39:08 2009
New Revision: 69383
Modified:
pypy/branch/faster-raise/pypy/interpreter/executioncontext.py
pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py
Log:
Really fix the previous test, without breaking other tests.
Argh, this is a bit of a mess.
Modified: pypy/branch/faster-raise/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/executioncontext.py (original)
+++ pypy/branch/faster-raise/pypy/interpreter/executioncontext.py Wed Nov 18 16:39:08 2009
@@ -138,17 +138,17 @@
def _unchain(self, frame):
#assert frame is self.gettopframe() --- slowish
+ if self.some_frame is frame:
+ self.some_frame = frame.f_back_some
+ else:
+ f_back = frame.f_back()
+ if f_back is not None:
+ f_back.f_forward = None
+
if frame.last_exception is not None:
f_back = frame.f_back()
frame.f_back_some = f_back
frame.f_back_forced = True
- if self.some_frame is frame:
- f_back = frame.f_back_some
- self.some_frame = f_back
- else:
- f_back = frame.f_back()
- if f_back is not None:
- f_back.f_forward = None
self.framestackdepth -= 1
Modified: pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py (original)
+++ pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py Wed Nov 18 16:39:08 2009
@@ -777,6 +777,5 @@
#
# test for a bug: what happens if we _unchain frame2 without an exc.
assert frame2.last_exception is None
- assert ec.some_frame is frame2
ec._unchain(frame2)
assert frame._f_forward is None
More information about the Pypy-commit
mailing list