Cython has moved to github.
cython-devel
view tests/run/isnonebool.pyx @ 1622:4f0327bdebc9
test for temp allocation bug in call
| author | Robert Bradshaw <robertwb@math.washington.edu> |
|---|---|
| date | Sat Jan 17 01:25:34 2009 -0800 (3 years ago) |
| parents | ac50448e8327 |
| children | 82d312a9f1fc |
line source
1 __doc__ = u"""
2 >>> test_and(None, None)
3 True
4 >>> test_and(None, 1)
5 False
6 >>> test_and(1, None)
7 False
9 >>> test_more(None, None)
10 True
11 >>> test_more(None, 1)
12 True
13 >>> test_more(1, None)
14 False
15 >>> test_more(None, 0)
16 False
18 >>> test_more_c(None, None)
19 True
20 >>> test_more_c(None, 1)
21 True
22 >>> test_more_c(1, None)
23 False
24 >>> test_more_c(None, 0)
25 False
26 """
28 def test_and(a,b):
29 return a is None and b is None
31 def test_more(a,b):
32 return a is None and (b is None or b == 1)
34 def test_more_c(a,b):
35 return (a is None or 1 == 2) and (b is None or b == 1)
