bug test for ticket 166
authorStefan Behnel <scoder@users.berlios.de>
Sun, 25 Jan 2009 08:55:55 +0000 (09:55 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 25 Jan 2009 08:55:55 +0000 (09:55 +0100)
tests/bugs/builtin_types_none_T166.pyx [new file with mode: 0644]

diff --git a/tests/bugs/builtin_types_none_T166.pyx b/tests/bugs/builtin_types_none_T166.pyx
new file mode 100644 (file)
index 0000000..74ac1f3
--- /dev/null
@@ -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)