Package: python-xarray / 0.12.1-2~bpo10+1

ARM_xfail_tests.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Description: ARM xfail tests
 These tests are expected to fail on ARM due to the following issue in Numpy:
 https://github.com/numpy/numpy/issues/8325
Author: Graham Inggs <ginggs@debian.org>
Bug-Debian: http://bugs.debian.org/904785
Forwarded: no
Last-Update: 2018-07-29

Index: python-xarray-0.12.0/xarray/tests/test_backends.py
===================================================================
--- python-xarray-0.12.0.orig/xarray/tests/test_backends.py
+++ python-xarray-0.12.0/xarray/tests/test_backends.py
@@ -31,7 +31,7 @@ from xarray.coding.variables import Seri
 
 from . import (
     assert_allclose, assert_array_equal, assert_equal, assert_identical,
-    has_dask, has_netCDF4, has_scipy, network, raises_regex, requires_cfgrib,
+    has_dask, has_netCDF4, has_scipy, network, raises_regex, requires_cfgrib, arm_xfail,
     requires_cftime, requires_dask, requires_h5netcdf, requires_netCDF4,
     requires_pathlib, requires_pseudonetcdf, requires_pydap, requires_pynio,
     requires_rasterio, requires_scipy, requires_scipy_or_netCDF4,
@@ -396,6 +396,7 @@ class DatasetIOBase(object):
             assert_identical(expected, actual)
             assert actual['x'].encoding['_Encoding'] == 'ascii'
 
+    @arm_xfail
     def test_roundtrip_numpy_datetime_data(self):
         times = pd.to_datetime(['2000-01-01', '2000-01-02', 'NaT'])
         expected = Dataset({'t': ('t', times), 't0': times[0]})
Index: python-xarray-0.12.0/xarray/tests/test_coding_times.py
===================================================================
--- python-xarray-0.12.0.orig/xarray/tests/test_coding_times.py
+++ python-xarray-0.12.0/xarray/tests/test_coding_times.py
@@ -14,7 +14,7 @@ from xarray.core.common import contains_
 from xarray.testing import assert_equal
 
 from . import (
-    assert_array_equal, has_cftime, has_cftime_or_netCDF4, has_dask,
+    assert_array_equal, has_cftime, has_cftime_or_netCDF4, has_dask, arm_xfail,
     requires_cftime_or_netCDF4, requires_cftime)
 
 try:
@@ -469,6 +469,7 @@ def test_decode_360_day_calendar():
         assert_array_equal(actual, expected)
 
 
+@arm_xfail
 @pytest.mark.skipif(not has_cftime_or_netCDF4, reason='cftime not installed')
 @pytest.mark.parametrize(
     ['num_dates', 'units', 'expected_list'],
Index: python-xarray-0.12.0/xarray/tests/__init__.py
===================================================================
--- python-xarray-0.12.0.orig/xarray/tests/__init__.py
+++ python-xarray-0.12.0/xarray/tests/__init__.py
@@ -32,6 +32,9 @@ try:
 except ImportError:
     pass
 
+import platform
+arm_xfail = pytest.mark.xfail(platform.machine() == 'aarch64' or
+    'arm' in platform.machine(), reason='expected failure on ARM')
 
 def _importorskip(modname, minversion=None):
     try: