From 85d2aa916bc70cba58872996e44b2a9d1b33a190 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 25 Jan 2009 09:55:55 +0100 Subject: [PATCH] bug test for ticket 166 --- tests/bugs/builtin_types_none_T166.pyx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/bugs/builtin_types_none_T166.pyx 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) -- 2.26.2