Commit c872b999 authored by Stefan Behnel's avatar Stefan Behnel

Fix a CPython comparison test in CPython 3.3 which was apparently fixed only in 3.4 and later.

parent 6ef7d223
...@@ -25,9 +25,6 @@ def test_generator_frame_cycle(): ...@@ -25,9 +25,6 @@ def test_generator_frame_cycle():
eval('g.throw(ValueError)', {'g': g}) eval('g.throw(ValueError)', {'g': g})
del g del g
if cython.compiled:
# FIXME: this should not be necessary, but I can't see how to do it...
import gc; gc.collect()
return tuple(testit) return tuple(testit)
...@@ -53,11 +50,11 @@ def test_generator_frame_cycle_with_outer_exc(): ...@@ -53,11 +50,11 @@ def test_generator_frame_cycle_with_outer_exc():
assert sys.exc_info()[1] is exc, sys.exc_info() assert sys.exc_info()[1] is exc, sys.exc_info()
# Frame object cycle # Frame object cycle
eval('g.throw(ValueError)', {'g': g}) eval('g.throw(ValueError)', {'g': g})
assert sys.exc_info()[1] is exc, sys.exc_info() # CPython 3.3 handles this incorrectly itself :)
if cython.compiled or sys.version_info[:2] not in [(3, 2), (3, 3)]:
assert sys.exc_info()[1] is exc, sys.exc_info()
del g del g
assert sys.exc_info()[1] is exc, sys.exc_info() if cython.compiled or sys.version_info[:2] not in [(3, 2), (3, 3)]:
assert sys.exc_info()[1] is exc, sys.exc_info()
if cython.compiled:
# FIXME: this should not be necessary, but I can't see how to do it...
import gc; gc.collect()
return tuple(testit) return tuple(testit)
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