[pypy-commit] pypy py3.5: fix for some app-level untranslated tests, e.g. skipped ones
arigo
pypy.commits at gmail.com
Sat Dec 3 11:53:15 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r88856:eb6adc5edd60
Date: 2016-12-03 17:52 +0100
http://bitbucket.org/pypy/pypy/changeset/eb6adc5edd60/
Log: fix for some app-level untranslated tests, e.g. skipped ones
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -256,13 +256,22 @@
# MemoryError is raised at just the wrong place
executioncontext = self.space.getexecutioncontext()
exc_on_enter = executioncontext.sys_exc_info()
- try:
- return self.execute_frame()
- finally:
- if we_are_translated():
+ if we_are_translated():
+ try:
+ return self.execute_frame()
+ finally:
executioncontext.set_sys_exc_info(exc_on_enter)
- else:
+ else:
+ # untranslated, we check consistency, but not in case of
+ # interp-level exceptions different than OperationError
+ # (e.g. a random failing test, or a pytest Skipped exc.)
+ try:
+ w_res = self.execute_frame()
assert exc_on_enter is executioncontext.sys_exc_info()
+ except OperationError:
+ assert exc_on_enter is executioncontext.sys_exc_info()
+ raise
+ return w_res
run._always_inline_ = True
def initialize_as_generator(self, name, qualname):
More information about the pypy-commit
mailing list