From e15eb5611e612528b3b1bbc7dd9ff9a576d14d65 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 20 Oct 2009 21:02:54 +0200 Subject: [PATCH] extended test case --- tests/run/inop.pyx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/run/inop.pyx b/tests/run/inop.pyx index 76fbd776..49e8af38 100644 --- a/tests/run/inop.pyx +++ b/tests/run/inop.pyx @@ -46,6 +46,15 @@ __doc__ = u""" >>> q(1) Traceback (most recent call last): TypeError: 'NoneType' object is not iterable + + >>> l = [1,2,3,4] + >>> l2 = [l[1:],l[:-1],l] + >>> 2 in l in l2 + True + >>> r(2) + 1 + >>> s(2) + 1 """ def f(a,b): @@ -87,3 +96,13 @@ def q(a): cdef dict d = None cdef int result = a in d # should fail with a TypeError return result + +def r(a): + l = [1,2,3,4] + l2 = [l[1:],l[:-1],l] + cdef int result = a in l in l2 + return result + +def s(a): + cdef int result = a in [1,2,3,4] in [[1,2,3],[2,3,4],[1,2,3,4]] + return result -- 2.26.2