projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e257fc
)
test mixed boolean operations with C types and Python types
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 2 Feb 2008 11:38:13 +0000
(12:38 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 2 Feb 2008 11:38:13 +0000
(12:38 +0100)
tests/run/isnonebool.pyx
patch
|
blob
|
history
diff --git
a/tests/run/isnonebool.pyx
b/tests/run/isnonebool.pyx
index 1bee4ec98e78c24498f8a5bcb44f6b854d1b1c62..56f0dc656965054ff2f5e6847348b3821e964463 100644
(file)
--- 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)