extend test case
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 2 Feb 2013 10:26:01 +0000 (11:26 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 2 Feb 2013 10:26:01 +0000 (11:26 +0100)
tests/run/cdef_setitem_T284.pyx

index 07e9d4f..2c885d5 100644 (file)
@@ -20,6 +20,18 @@ def with_cdef():
     cdef dict dd = {}
     dd[ob] = -10
 
+def with_external_list(list L):
+    """
+    >>> with_external_list([1,2,3])
+    [1, -10, 3]
+    >>> with_external_list(None)
+    Traceback (most recent call last):
+    TypeError: 'NoneType' object is not subscriptable
+    """
+    ob = 1L
+    L[ob] = -10
+    return L
+
 def test_list(list L, object i, object a):
     """
     >>> test_list(list(range(11)), -2, None)