summaryrefslogtreecommitdiff
path: root/tests/run/numpy_test.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/numpy_test.pyx')
-rw-r--r--tests/run/numpy_test.pyx20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/run/numpy_test.pyx b/tests/run/numpy_test.pyx
index e81547c32..d2718a463 100644
--- a/tests/run/numpy_test.pyx
+++ b/tests/run/numpy_test.pyx
@@ -10,16 +10,10 @@ def little_endian():
cdef int endian_detector = 1
return (<char*>&endian_detector)[0] != 0
-__test__ = {}
def testcase(f):
- __test__[f.__name__] = f.__doc__
- return f
-
-def testcase_have_buffer_interface(f):
- major, minor, *rest = np.__version__.split('.')
- if (int(major), int(minor)) >= (1, 5):
- __test__[f.__name__] = f.__doc__
+ # testcase decorator now does nothing (following changes to doctest)
+ # but is a useful indicator of what functions are designed as tests
return f
if little_endian():
@@ -180,7 +174,7 @@ try:
('a', np.dtype('i,i')),\
('b', np.dtype('i,i'))\
])))) # doctest: +NORMALIZE_WHITESPACE
- array([((0, 0), (0, 0)), ((1, 2), (1, 4)), ((1, 2), (1, 4))],
+ array([((0, 0), (0, 0)), ((1, 2), (1, 4)), ((1, 2), (1, 4))],
dtype=[('a', [('f0', '!i4'), ('f1', '!i4')]), ('b', [('f0', '!i4'), ('f1', '!i4')])])
>>> print(test_nested_dtypes(np.zeros((3,), dtype=np.dtype([\
@@ -233,7 +227,7 @@ try:
8,16
>>> test_point_record() # doctest: +NORMALIZE_WHITESPACE
- array([(0., 0.), (1., -1.), (2., -2.)],
+ array([(0., 0.), (1., -1.), (2., -2.)],
dtype=[('x', '!f8'), ('y', '!f8')])
"""
@@ -267,8 +261,6 @@ try:
except:
__doc__ = u""
-__test__[__name__] = __doc__
-
def assert_dtype_sizes():
assert sizeof(np.int8_t) == 1
@@ -679,7 +671,6 @@ def get_Foo_array():
data[5].b = 9.0
return np.asarray(<Foo[:]>data).copy()
-@testcase_have_buffer_interface
def test_fused_ndarray(fused_ndarray a):
"""
>>> import cython
@@ -728,9 +719,6 @@ cpdef test_fused_cpdef_ndarray(fused_ndarray a):
else:
print b[5]
-testcase_have_buffer_interface(test_fused_cpdef_ndarray)
-
-@testcase_have_buffer_interface
def test_fused_cpdef_ndarray_cdef_call():
"""
>>> test_fused_cpdef_ndarray_cdef_call()