Skip to content

Commit 7b12c91

Browse files
committed
skip instead of fail
1 parent 88e1b81 commit 7b12c91

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/window/test_rolling.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
datetime,
33
timedelta,
44
)
5+
import platform
56
import sys
67

78
import numpy as np
@@ -1082,12 +1083,14 @@ def test_rolling_sem(frame_or_series):
10821083
tm.assert_series_equal(result, expected)
10831084

10841085

1085-
@pytest.mark.xfail(
1086+
@pytest.mark.skipif(
10861087
is_platform_arm()
10871088
or is_platform_power()
10881089
or is_platform_riscv64()
1089-
or sys.platform == "emscripten",
1090-
reason="GH 38921: known numerical instability on 32-bit platforms or Pyodide",
1090+
or platform.architecture()[0] == "32bit"
1091+
or sys.platform in ("emscripten", "wasm"),
1092+
reason="GH 38921: skipped due to known numerical instability on 32-bit or "
1093+
"WebAssembly platforms (Pyodide)",
10911094
)
10921095
@pytest.mark.parametrize(
10931096
("func", "third_value", "values"),
@@ -1103,7 +1106,7 @@ def test_rolling_var_numerical_issues(func, third_value, values):
11031106
ds = Series([99999999999999999, 1, third_value, 2, 3, 1, 1])
11041107
result = getattr(ds.rolling(2), func)()
11051108
expected = Series([np.nan] + values)
1106-
tm.assert_almost_equal(result[1:].values, expected[1:].values, rtol=1e-2, atol=1e-5)
1109+
tm.assert_almost_equal(result[1:].values, expected[1:].values, rtol=1e-3, atol=1e-6)
11071110

11081111

11091112
def test_timeoffset_as_window_parameter_for_corr(unit):

0 commit comments

Comments
 (0)