Commit 8a79be0f authored by Stefan Behnel's avatar Stefan Behnel

removed test from pure.pyx that only works in real pure mode

parent 7115c1ba
......@@ -70,55 +70,6 @@ def test_locals(x):
y = x
return y
@cython.test_assert_path_exists("//TryFinallyStatNode",
"//TryFinallyStatNode//GILStatNode")
@cython.test_fail_if_path_exists("//TryFinallyStatNode//TryFinallyStatNode")
def test_with_nogil(nogil):
"""
>>> raised = []
>>> class nogil(object):
... def __enter__(self):
... pass
... def __exit__(self, exc_class, exc, tb):
... raised.append(exc)
... return exc_class is None
>>> test_with_nogil(nogil())
WORKS
True
>>> raised
[None]
"""
result = False
with nogil:
print "WORKS"
with cython.nogil:
result = True
return result
@cython.test_assert_path_exists("//TryFinallyStatNode",
"//TryFinallyStatNode//GILStatNode")
@cython.test_fail_if_path_exists("//TryFinallyStatNode//TryFinallyStatNode")
def test_with_nogil_multiple(nogil):
"""
>>> raised = []
>>> class nogil(object):
... def __enter__(self):
... pass
... def __exit__(self, exc_class, exc, tb):
... raised.append(exc)
... return exc_class is None
>>> test_with_nogil_multiple(nogil())
True
>>> raised
[None]
"""
result = False
with nogil, cython.nogil:
result = True
return result
MyUnion = cython.union(n=cython.int, x=cython.double)
MyStruct = cython.struct(is_integral=cython.bint, data=MyUnion)
MyStruct2 = cython.typedef(MyStruct[2])
......
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