removed test from pure.pyx that only works in real pure mode
authorStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 15:02:12 +0000 (16:02 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 15:02:12 +0000 (16:02 +0100)
tests/run/pure.pyx

index 26fb31070c8d9328a6d7d9450d50cfdc223c34e5..4ed263e87d38507bda1e3a29941af81507c8352e 100644 (file)
@@ -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])