Commit ba03c237 authored by Stefan Behnel's avatar Stefan Behnel

Work around test failure in Py2.x.

parent c0724860
...@@ -151,6 +151,7 @@ def check_throw(): ...@@ -151,6 +151,7 @@ def check_throw():
def check_yield_in_except(): def check_yield_in_except():
""" """
>>> if sys.version_info[0] == 2: sys.exc_clear()
>>> try: >>> try:
... raise TypeError("RAISED !") ... raise TypeError("RAISED !")
... except TypeError as orig_exc: ... except TypeError as orig_exc:
...@@ -174,6 +175,7 @@ def check_yield_in_except(): ...@@ -174,6 +175,7 @@ def check_yield_in_except():
except ValueError as exc: except ValueError as exc:
assert sys.exc_info()[1] is exc, sys.exc_info() assert sys.exc_info()[1] is exc, sys.exc_info()
yield yield
if cython.compiled or sys.version_info[0] > 2:
assert sys.exc_info()[1] is exc, sys.exc_info() assert sys.exc_info()[1] is exc, sys.exc_info()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment