From 1e8d6249fb8448c7d3fc317526c1915341ddf8ae Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 2 Feb 2008 12:38:13 +0100 Subject: [PATCH] test mixed boolean operations with C types and Python types --- tests/run/isnonebool.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.26.2