Skip to content

Commit 19f31f4

Browse files
Debian Science Teamraspbian-autopush
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 pandas/tests/window/test_rolling.py also gets an i386 xfail for rounding error that may be x87 excess precision 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 24763eb commit 19f31f4

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

pandas/tests/groupby/test_groupby.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,7 @@ def test_groupby_series_with_tuple_name():
25872587
tm.assert_series_equal(result, expected)
25882588

25892589

2590-
@pytest.mark.xfail(not IS64, reason="GH#38778: fail on 32-bit system")
2590+
@pytest.mark.xfail(not IS64, reason="GH#38778: fail on 32-bit system", strict=False)
25912591
@pytest.mark.parametrize(
25922592
"func, values", [("sum", [97.0, 98.0]), ("mean", [24.25, 24.5])]
25932593
)
@@ -2600,7 +2600,7 @@ def test_groupby_numerical_stability_sum_mean(func, values):
26002600
tm.assert_frame_equal(result, expected)
26012601

26022602

2603-
@pytest.mark.xfail(not IS64, reason="GH#38778: fail on 32-bit system")
2603+
@pytest.mark.xfail(not IS64, reason="GH#38778: fail on 32-bit system", strict=False)
26042604
def test_groupby_numerical_stability_cumsum():
26052605
# GH#38934
26062606
data = [1e16, 1e16, 97, 98, -5e15, -5e15, -5e15, -5e15]

pandas/tests/io/parser/test_c_parser_only.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
concat,
3030
)
3131
import pandas._testing as tm
32+
import platform
33+
import re
34+
is_platform_x86 = bool(re.match('i.?86|x86',platform.uname()[4]))
3235

3336

3437
@pytest.mark.parametrize(
@@ -680,9 +683,9 @@ def test_float_precision_options(c_parser_only):
680683

681684
df3 = parser.read_csv(StringIO(s), float_precision="legacy")
682685

683-
if IS64:
686+
if is_platform_x86 and IS64:
684687
assert not df.iloc[0, 0] == df3.iloc[0, 0]
685-
else:
688+
elif is_platform_x86:
686689
assert df.iloc[0, 0] == df3.iloc[0, 0]
687690

688691
msg = "Unrecognized float_precision option: junk"

pandas/tests/tools/test_to_numeric.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def test_to_numeric_from_nullable_string(values, nullable_string_dtype, expected
760760
"UInt64",
761761
"signed",
762762
"UInt64",
763-
marks=pytest.mark.xfail(not is_platform_arm(), reason="GH38798"),
763+
marks=pytest.mark.xfail(strict=False, reason="GH38798"),
764764
),
765765
([1, 1], "Int64", "unsigned", "UInt8"),
766766
([1.0, 1.0], "Float32", "unsigned", "UInt8"),

pandas/tests/window/test_rolling.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
from pandas.compat import (
1414
is_platform_arm,
1515
is_platform_mac,
16+
IS64,
1617
)
18+
import platform
19+
import re
20+
is_platform_x86_64 = bool(re.match('i.?86|x86',platform.uname()[4])) and IS64
21+
1722
from pandas.errors import UnsupportedFunctionCall
1823

1924
from pandas import (
@@ -1195,7 +1200,7 @@ def test_rolling_sem(frame_or_series):
11951200
tm.assert_series_equal(result, expected)
11961201

11971202

1198-
@pytest.mark.xfail(is_platform_arm() and not is_platform_mac(), reason="GH 38921")
1203+
@pytest.mark.xfail(not is_platform_x86_64, strict=False, reason="GH 38921")
11991204
@pytest.mark.parametrize(
12001205
("func", "third_value", "values"),
12011206
[

0 commit comments

Comments
 (0)