From f53435f232130b4454f82bde30a81ddb308b6366 Mon Sep 17 00:00:00 2001 From: Mark Ryan Date: Fri, 23 Feb 2024 09:19:58 +0000 Subject: [PATCH] TST: Skip test_rolling_var_numerical_issues on riscv64 platforms The test is failing on riscv64. The failure is reproducible under qemu and on real hardware (VisionFive 2). Updates #38921 --- pandas/compat/__init__.py | 12 ++++++++++++ pandas/tests/window/test_rolling.py | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index caa00b205a29c..572dd8c9b61a0 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -122,6 +122,18 @@ def is_platform_power() -> bool: return platform.machine() in ("ppc64", "ppc64le") +def is_platform_riscv64() -> bool: + """ + Checking if the running platform use riscv64 architecture. + + Returns + ------- + bool + True if the running platform uses riscv64 architecture. + """ + return platform.machine() == "riscv64" + + def is_ci_environment() -> bool: """ Checking if running in a continuous integration environment by checking diff --git a/pandas/tests/window/test_rolling.py b/pandas/tests/window/test_rolling.py index 85821ed2cfb6f..fc8d7f69b8180 100644 --- a/pandas/tests/window/test_rolling.py +++ b/pandas/tests/window/test_rolling.py @@ -10,6 +10,7 @@ IS64, is_platform_arm, is_platform_power, + is_platform_riscv64, ) from pandas import ( @@ -1081,7 +1082,7 @@ def test_rolling_sem(frame_or_series): @pytest.mark.xfail( - is_platform_arm() or is_platform_power(), + is_platform_arm() or is_platform_power() or is_platform_riscv64(), reason="GH 38921", ) @pytest.mark.parametrize(