summaryrefslogtreecommitdiff
path: root/tests/run/pure_py.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/pure_py.py')
-rw-r--r--tests/run/pure_py.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/run/pure_py.py b/tests/run/pure_py.py
index 93f737453..ae1f820d3 100644
--- a/tests/run/pure_py.py
+++ b/tests/run/pure_py.py
@@ -33,17 +33,18 @@ def test_sizeof():
def test_declare(n):
"""
>>> test_declare(100)
- (100, 100)
+ (100, 100, 100)
>>> test_declare(100.5)
- (100, 100)
+ (100, 100, 100)
"""
x = cython.declare(cython.int)
y = cython.declare(cython.int, n)
+ z = cython.declare(int, n) # C int
if cython.compiled:
cython.declare(xx=cython.int, yy=cython.long)
i = cython.sizeof(xx)
ptr = cython.declare(cython.p_int, cython.address(y))
- return y, ptr[0]
+ return y, z, ptr[0]
@cython.locals(x=cython.double, n=cython.int)
@@ -548,18 +549,18 @@ def empty_declare():
]
r2.is_integral = True
- assert( r2.is_integral == True )
+ assert r2.is_integral == True
r3.x = 12.3
- assert( r3.x == 12.3 )
+ assert r3.x == 12.3
#It generates a correct C code, but raises an exception when interpreted
if cython.compiled:
r4[0].is_integral = True
- assert( r4[0].is_integral == True )
+ assert r4[0].is_integral == True
r5[0] = 42
- assert ( r5[0] == 42 )
+ assert r5[0] == 42
return [i for i, x in enumerate(res) if not x]