Commit 92b3fb22 authored by Stefan Behnel's avatar Stefan Behnel

Fix usage of special name "sizeof" in a test: cannot be assigned to a variable...

Fix usage of special name "sizeof" in a test: cannot be assigned to a variable because it is not an actual function.
parent 62ed5b2c
...@@ -2,6 +2,7 @@ import sys ...@@ -2,6 +2,7 @@ import sys
IS_PY2 = sys.version_info[0] < 3 IS_PY2 = sys.version_info[0] < 3
import cython import cython
from cython import sizeof
is_compiled = cython.compiled is_compiled = cython.compiled
...@@ -20,7 +21,6 @@ def test_sizeof(): ...@@ -20,7 +21,6 @@ def test_sizeof():
""" """
x = cython.declare(cython.bint) x = cython.declare(cython.bint)
print(cython.sizeof(x) == cython.sizeof(cython.bint)) print(cython.sizeof(x) == cython.sizeof(cython.bint))
sizeof = cython.sizeof
print(sizeof(cython.char) <= sizeof(cython.short) <= sizeof(cython.int) <= sizeof(cython.long) <= sizeof(cython.longlong)) print(sizeof(cython.char) <= sizeof(cython.short) <= sizeof(cython.int) <= sizeof(cython.long) <= sizeof(cython.longlong))
print(cython.sizeof(cython.uint) == cython.sizeof(cython.int)) print(cython.sizeof(cython.uint) == cython.sizeof(cython.int))
print(cython.sizeof(cython.p_int) == cython.sizeof(cython.p_double)) print(cython.sizeof(cython.p_int) == cython.sizeof(cython.p_double))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment