extended 'if' test case that enforces heavy temp usage
authorStefan Behnel <scoder@users.berlios.de>
Wed, 3 Dec 2008 21:39:59 +0000 (22:39 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 3 Dec 2008 21:39:59 +0000 (22:39 +0100)
tests/run/if.pyx

index f7c120a6535bcf84e66afba70473b9d243af72ae..87123ae08f9184c22d51ce74d40a5b484aba9caa 100644 (file)
@@ -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