From 541c78bbb416fc97bacc450f0ec5a9f3e5fa4785 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 3 Dec 2008 22:39:59 +0100 Subject: [PATCH] extended 'if' test case that enforces heavy temp usage --- tests/run/if.pyx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/run/if.pyx b/tests/run/if.pyx index f7c120a6..87123ae0 100644 --- a/tests/run/if.pyx +++ b/tests/run/if.pyx @@ -19,6 +19,13 @@ __doc__ = u""" 2 >>> h(0,0) 3 + + >>> i(1,2) + 1 + >>> i(2,2) + 2 + >>> i(2,1) + 0 """ def f(a, b): @@ -46,3 +53,11 @@ def h(a, b): else: x = 3 return x + +def i(a, b): + x = 0 + if str(a).upper() == u"1": + x = 1 + if str(a+b).lower() not in (u"1", u"3"): + x = 2 + return x -- 2.26.2