gentoo-overlay/dev-python/cython/files/0.15.1-test.patch

56 lines
2.3 KiB
Diff

diff -ur Cython-0.15.1.orig/tests/run/numpy_test.pyx Cython-0.15.1/tests/run/numpy_test.pyx
--- tests/run/numpy_test.pyx 2011-09-20 11:57:45.000000000 +0800
+++ tests/run/numpy_test.pyx 2011-12-10 05:07:32.155836575 +0800
@@ -211,29 +211,6 @@
"""
- if np.__version__ >= '1.6':
- __doc__ += u"""
- The following expose bugs in Numpy (versions prior to 2011-04-02):
-
- >>> print(test_partially_packed_align(np.zeros((1,), dtype=np.dtype([('a', 'b'), ('b', 'i'), ('sub', np.dtype('b,i')), ('c', 'i')], align=True))))
- array([(22, 23, (24, 25), 26)],
- dtype=[('a', '|i1'), ('', '|V3'), ('b', '!i4'), ('sub', [('f0', '|i1'), ('f1', '!i4')]), ('', '|V3'), ('c', '!i4')])
-
- >>> print(test_partially_packed_align_2(np.zeros((1,), dtype=np.dtype([('a', 'b'), ('b', 'i'), ('c', 'b'), ('sub', np.dtype('b,i', align=True))]))))
- array([(22, 23, 24, (27, 28))],
- dtype=[('a', '|i1'), ('b', '!i4'), ('c', '|i1'), ('sub', [('f0', '|i1'), ('', '|V3'), ('f1', '!i4')])])
-
- >>> print(test_partially_packed_align(np.zeros((1,), dtype=np.dtype([('a', 'b'), ('b', 'i'), ('sub', np.dtype('b,i')), ('c', 'i')], align=False)))) #doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- ValueError: ...
-
- >>> print(test_partially_packed_align_2(np.zeros((1,), dtype=np.dtype([('a', 'b'), ('b', 'i'), ('c', 'b'), ('sub', np.dtype('b,i', align=False))])))) #doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- ValueError: ...
- """
-
except:
__doc__ = u""
@@ -448,22 +425,6 @@
arr[0].b = 23
return repr(arr).replace('<', '!').replace('>', '!')
-def test_partially_packed_align(np.ndarray[PartiallyPackedStruct] arr):
- arr[0].a = 22
- arr[0].b = 23
- arr[0].sub.a = 24
- arr[0].sub.b = 25
- arr[0].c = 26
- return repr(arr).replace('<', '!').replace('>', '!')
-
-def test_partially_packed_align_2(np.ndarray[PartiallyPackedStruct2] arr):
- arr[0].a = 22
- arr[0].b = 23
- arr[0].c = 24
- arr[0].sub.a = 27
- arr[0].sub.b = 28
- return repr(arr).replace('<', '!').replace('>', '!')
-
def test_complextypes():
cdef np.complex64_t x64 = 1, y64 = 1j
cdef np.complex128_t x128 = 1, y128 = 1j