Commit 9076b8a4 authored by Mark Florisson's avatar Mark Florisson

Add nogil nonecheck tests (don't segfault)

parent 9a7d4405
......@@ -37,6 +37,26 @@ def setattr_(MyClass var):
"""
var.a = 10
@cython.nonecheck(True)
def getattr_nogil(MyClass var):
"""
>>> getattr_nogil(None)
Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'a'
"""
with nogil:
var.a
@cython.nonecheck(True)
def setattr_nogil(MyClass var):
"""
>>> setattr_nogil(None)
Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'a'
"""
with nogil:
var.a = 1
def some():
return MyClass(4, 5)
......
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