Cython has moved to github.
cython-devel
view tests/run/assert.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 | 585d725fe537 |
| children | 82d312a9f1fc |
line source
1 __doc__ = u"""
2 >>> f(1, 2, 1)
3 >>> f(0, 2, 1)
4 Traceback (most recent call last):
5 AssertionError
6 >>> f(1, -1, 1)
7 Traceback (most recent call last):
8 AssertionError
9 >>> f(1, 2, 0)
10 Traceback (most recent call last):
11 AssertionError
13 >>> g(1, "works")
14 >>> g(0, "fails")
15 Traceback (most recent call last):
16 AssertionError: fails
17 """
19 def f(a, b, int i):
20 assert a
21 assert a+b
22 assert i
24 def g(a, b):
25 assert a, b
