mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-02-07 00:47:39 -08:00
74 lines
1.8 KiB
Diff
74 lines
1.8 KiB
Diff
These tests are x86{_64}-centric because they rely on a specific result of
|
|
casting a float64 NaN to int64, which is undefined in the C standard.
|
|
See https://github.com/numpy/numpy/issues/8325 for details.
|
|
|
|
--- a/xarray/tests/__init__.py
|
|
+++ b/xarray/tests/__init__.py
|
|
@@ -40,6 +40,12 @@
|
|
)
|
|
|
|
|
|
+riscv_xfail = pytest.mark.xfail(
|
|
+ "riscv" in platform.machine(),
|
|
+ reason="expected failure on RISC-V",
|
|
+)
|
|
+
|
|
+
|
|
def _importorskip(modname, minversion=None):
|
|
try:
|
|
mod = importlib.import_module(modname)
|
|
--- a/xarray/tests/test_backends.py
|
|
+++ b/xarray/tests/test_backends.py
|
|
@@ -71,6 +71,7 @@
|
|
requires_scipy,
|
|
requires_scipy_or_netCDF4,
|
|
requires_zarr,
|
|
+ riscv_xfail,
|
|
)
|
|
from .test_coding_times import (
|
|
_ALL_CALENDARS,
|
|
@@ -492,6 +493,7 @@
|
|
assert actual["x"].encoding["_Encoding"] == "ascii"
|
|
|
|
@arm_xfail
|
|
+ @riscv_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]})
|
|
--- a/xarray/tests/test_coding_times.py
|
|
+++ b/xarray/tests/test_coding_times.py
|
|
@@ -36,6 +36,7 @@
|
|
requires_cftime,
|
|
requires_cftime_1_4_1,
|
|
requires_dask,
|
|
+ riscv_xfail,
|
|
)
|
|
|
|
_NON_STANDARD_CALENDARS_SET = {
|
|
@@ -466,6 +467,7 @@
|
|
|
|
|
|
@arm_xfail
|
|
+@riscv_xfail
|
|
@requires_cftime
|
|
@pytest.mark.parametrize(
|
|
["num_dates", "units", "expected_list"],
|
|
--- a/xarray/tests/test_duck_array_ops.py
|
|
+++ b/xarray/tests/test_duck_array_ops.py
|
|
@@ -38,6 +38,7 @@
|
|
requires_bottleneck,
|
|
requires_cftime,
|
|
requires_dask,
|
|
+ riscv_xfail,
|
|
)
|
|
|
|
|
|
@@ -280,6 +281,7 @@
|
|
|
|
|
|
@arm_xfail
|
|
+@riscv_xfail
|
|
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
|
|
@pytest.mark.parametrize("dask", [False, True] if has_dask else [False])
|
|
def test_datetime_mean(dask):
|