From: Stefan Behnel Date: Wed, 3 Dec 2008 21:39:59 +0000 (+0100) Subject: extended 'if' test case that enforces heavy temp usage X-Git-Tag: 0.11-beta~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=541c78bbb416fc97bacc450f0ec5a9f3e5fa4785;p=cython.git extended 'if' test case that enforces heavy temp usage --- 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