Skip to content

Commit 1f36f08

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
Fix arch-specific upstream xfails
We test on more architectures, so upstream's xfails are not always correct everywhere. On those known to fail: arm64 xfail -> all non-x86 xfail x86 or unconditional strict xfail -> unconditional nonstrict xfail Author: Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#38921, pandas-dev/pandas#38798, pandas-dev/pandas#41740, numpy/numpy#19146 Forwarded: no Gbp-Pq: Name fix_overly_arch_specific_xfails.patch
1 parent 1864cee commit 1f36f08

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

pandas/tests/io/parser/test_c_parser_only.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import numpy as np
1818
import pytest
1919

20+
from pandas.compat import IS64
2021
from pandas.compat.numpy import np_version_gte1p24
2122
from pandas.errors import (
2223
ParserError,
@@ -29,6 +30,9 @@
2930
concat,
3031
)
3132
import pandas._testing as tm
33+
import platform
34+
import re
35+
is_platform_x86 = bool(re.match("i.?86|x86",platform.uname()[4]))
3236

3337

3438
@pytest.mark.parametrize(
@@ -633,11 +637,13 @@ def test_float_precision_options(c_parser_only):
633637

634638
tm.assert_frame_equal(df, df2)
635639

636-
df3 = parser.read_csv(StringIO(s), float_precision="legacy")
637-
638-
assert not df.iloc[0, 0] == df3.iloc[0, 0]
639-
640640
msg = "Unrecognized float_precision option: junk"
641641

642642
with pytest.raises(ValueError, match=msg):
643643
parser.read_csv(StringIO(s), float_precision="junk")
644+
645+
df3 = parser.read_csv(StringIO(s), float_precision="legacy")
646+
if is_platform_x86 and (not IS64) and (df.iloc[0, 0] == df3.iloc[0, 0]):
647+
pytest.xfail(reason="maybe x87 extra precision")
648+
649+
assert not df.iloc[0, 0] == df3.iloc[0, 0]

pandas/tests/window/test_rolling.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
IS64,
1111
is_platform_arm,
1212
is_platform_power,
13+
IS64,
1314
)
15+
import platform
16+
import re
17+
is_platform_x86 = bool(re.match("i.?86|x86", platform.uname()[4]))
1418

1519
from pandas import (
1620
DataFrame,
@@ -1176,7 +1180,8 @@ def test_rolling_sem(frame_or_series):
11761180

11771181

11781182
@pytest.mark.xfail(
1179-
is_platform_arm() or is_platform_power(),
1183+
not (is_platform_x86 and IS64),
1184+
strict=False,
11801185
reason="GH 38921",
11811186
)
11821187
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)