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

cftime_xfail.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
Description: XFAIL due to error in cftime 1.0.2
 With cftime 1.0.2, we get the following error when we use Python3:
 "TypeError: Cannot cast datetime.timedelta object from metadata [Y] to [us] according to the rule 'same_kind'"
 So mark the affected tests XFAIL until fixed.
Bug-Origin: https://bug.debian.org/913524
Last-Updated: 2018-11-12
Forwarded: no

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
@@ -1,6 +1,7 @@
 import warnings
 from itertools import product
 
+import sys
 import numpy as np
 import pandas as pd
 import pytest
@@ -77,6 +78,8 @@ def _all_cftime_date_types():
             'proleptic_gregorian': cftime.DatetimeProlepticGregorian}
 
 
+@pytest.mark.xfail(sys.version_info.major == 3,
+                  reason='cftime bug (in 1.0.2): fails to cast astype')
 @pytest.mark.skipif(not has_cftime_or_netCDF4, reason='cftime not installed')
 @pytest.mark.parametrize(['num_dates', 'units', 'calendar'],
                          _CF_DATETIME_TESTS)