diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-07-27 12:00:58 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-07-27 12:00:58 -0500 |
commit | 9ae5b5fab9f0c04c31c5d4b67d00c3cc79062731 (patch) | |
tree | db8ff646ecbd0187f3d7c165779e26108570be92 | |
parent | 3b5f871606a758f8bf19981b06f423792cbdc5f4 (diff) | |
parent | 7eefe925e6c6139d14972ee92affc4c2f19a7de6 (diff) | |
download | numpy-9ae5b5fab9f0c04c31c5d4b67d00c3cc79062731.tar.gz |
Merge pull request #4907 from juliantaylor/win-alignment
TST: win32 also does not provide 16 byte alignment
-rw-r--r-- | numpy/core/tests/test_numeric.py | 7 | ||||
-rw-r--r-- | numpy/f2py/tests/test_array_from_pyobj.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py index c85c5cf3e..483484467 100644 --- a/numpy/core/tests/test_numeric.py +++ b/numpy/core/tests/test_numeric.py @@ -1049,11 +1049,12 @@ class TestArrayComparisons(TestCase): def assert_array_strict_equal(x, y): assert_array_equal(x, y) - # Check flags - if 'sparc' not in platform.platform().lower(): + # Check flags, debian sparc and win32 don't provide 16 byte alignment + if (x.dtype.alignment > 8 and + 'sparc' not in platform.platform().lower() and + sys.platform != 'win32'): assert_(x.flags == y.flags) else: - # sparc arrays may not be aligned for long double types assert_(x.flags.owndata == y.flags.owndata) assert_(x.flags.writeable == y.flags.writeable) assert_(x.flags.c_contiguous == y.flags.c_contiguous) diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index de954c374..2dcb9e834 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -111,7 +111,7 @@ _cast_dict['CFLOAT'] = _cast_dict['FLOAT'] + ['CFLOAT'] # 16 byte long double types this means the inout intent cannot be satisfied and # several tests fail as the alignment flag can be randomly true or fals # when numpy gains an aligned allocator the tests could be enabled again -if 'sparc' not in platform.platform().lower(): +if 'sparc' not in platform.platform().lower() and sys.platform != 'win32': _type_names.extend(['LONGDOUBLE', 'CDOUBLE', 'CLONGDOUBLE']) _cast_dict['LONGDOUBLE'] = _cast_dict['LONG'] + \ ['ULONG', 'FLOAT', 'DOUBLE', 'LONGDOUBLE'] |