Cython has moved to github.

cython-devel

view tests/run/pycmp.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 2d802d43e315
children e957d7d1fecb
line source
1 __doc__ = u"""
2 >>> f()
3 >>> g()
4 """
6 def f():
7 cdef int bool, int1, int2
8 int1 = 0
9 int2 = 0
10 obj1 = 1
11 obj2 = 2
12 bool = obj1 == obj2
13 assert not bool
14 bool = obj1 <> int2
15 assert bool
16 bool = int1 == obj2
17 assert not bool
18 bool = obj1 is obj2
19 assert not bool
20 bool = obj1 is not obj2
21 assert bool
23 def g():
24 cdef int bool
25 obj1 = 1
26 obj2 = []
27 bool = obj1 in obj2
28 assert not bool
29 bool = obj1 not in obj2
30 assert bool