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

fix with_gil test in PyPy

parent 31375964
...@@ -3,9 +3,7 @@ Test the 'with gil:' statement. ...@@ -3,9 +3,7 @@ Test the 'with gil:' statement.
""" """
cimport cython cimport cython
from cpython.ref cimport PyObject
#from libc.stdio cimport printf, puts
from cpython cimport PyObject, Py_INCREF
import sys import sys
...@@ -277,22 +275,22 @@ cdef void void_nogil_nested_gil() nogil: ...@@ -277,22 +275,22 @@ cdef void void_nogil_nested_gil() nogil:
def test_nogil_void_funcs_with_gil(): def test_nogil_void_funcs_with_gil():
""" """
>>> redirect_stderr(test_nogil_void_funcs_with_gil) >>> redirect_stderr(test_nogil_void_funcs_with_gil) # doctest: +ELLIPSIS
Exception with_gil.ExceptionWithMsg: ExceptionWithMsg('This is swallowed') in 'with_gil.void_nogil_ignore_exception' ignored Exception ...ExceptionWithMsg: ExceptionWithMsg('This is swallowed') in 'with_gil.void_nogil_ignore_exception' ignored
Inner gil section Inner gil section
nogil section nogil section
Exception with_gil.ExceptionWithMsg: ExceptionWithMsg('Swallow this') in 'with_gil.void_nogil_nested_gil' ignored Exception ...ExceptionWithMsg: ExceptionWithMsg('Swallow this') in 'with_gil.void_nogil_nested_gil' ignored
""" """
void_nogil_ignore_exception() void_nogil_ignore_exception()
void_nogil_nested_gil() void_nogil_nested_gil()
def test_nogil_void_funcs_with_nogil(): def test_nogil_void_funcs_with_nogil():
""" """
>>> redirect_stderr(test_nogil_void_funcs_with_nogil) >>> redirect_stderr(test_nogil_void_funcs_with_nogil) # doctest: +ELLIPSIS
Exception with_gil.ExceptionWithMsg: ExceptionWithMsg('This is swallowed') in 'with_gil.void_nogil_ignore_exception' ignored Exception ...ExceptionWithMsg: ExceptionWithMsg('This is swallowed') in 'with_gil.void_nogil_ignore_exception' ignored
Inner gil section Inner gil section
nogil section nogil section
Exception with_gil.ExceptionWithMsg: ExceptionWithMsg('Swallow this') in 'with_gil.void_nogil_nested_gil' ignored Exception ...ExceptionWithMsg: ExceptionWithMsg('Swallow this') in 'with_gil.void_nogil_nested_gil' ignored
""" """
with nogil: with nogil:
void_nogil_ignore_exception() void_nogil_ignore_exception()
......
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