From: Stefan Behnel Date: Sat, 2 Feb 2008 11:38:13 +0000 (+0100) Subject: test mixed boolean operations with C types and Python types X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1e8d6249fb8448c7d3fc317526c1915341ddf8ae;p=cython.git test mixed boolean operations with C types and Python types --- diff --git a/tests/run/isnonebool.pyx b/tests/run/isnonebool.pyx index 1bee4ec9..56f0dc65 100644 --- a/tests/run/isnonebool.pyx +++ b/tests/run/isnonebool.pyx @@ -14,6 +14,15 @@ __doc__ = """ False >>> test_more(None, 0) False + + >>> test_more_c(None, None) + True + >>> test_more_c(None, 1) + True + >>> test_more_c(1, None) + False + >>> test_more_c(None, 0) + False """ def test_and(a,b): @@ -21,3 +30,6 @@ def test_and(a,b): def test_more(a,b): return a is None and (b is None or b == 1) + +def test_more_c(a,b): + return (a is None or 1 == 2) and (b is None or b == 1)