From: Stefan Behnel Date: Sun, 25 Jan 2009 08:55:55 +0000 (+0100) Subject: bug test for ticket 166 X-Git-Tag: 0.11.rc~106 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85d2aa916bc70cba58872996e44b2a9d1b33a190;p=cython.git bug test for ticket 166 --- diff --git a/tests/bugs/builtin_types_none_T166.pyx b/tests/bugs/builtin_types_none_T166.pyx new file mode 100644 index 00000000..74ac1f31 --- /dev/null +++ b/tests/bugs/builtin_types_none_T166.pyx @@ -0,0 +1,14 @@ +__doc__ = u""" +>>> l = None +>>> l.append(2) +Traceback (most recent call last): +AttributeError: 'NoneType' object has no attribute 'append' + +>>> append_to_none() +Traceback (most recent call last): +AttributeError: 'NoneType' object has no attribute 'append' +""" + +def append_to_none(): + cdef list l = None + l.append(2)