File: fix_overly_arch_specific_xfails.patch

package info (click to toggle)
pandas 2.2.3%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 66,784 kB
  • sloc: python: 422,228; ansic: 9,190; sh: 270; xml: 102; makefile: 83
file content (73 lines) | stat: -rw-r--r-- 2,267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description: 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 <rebecca_palmer@zoho.com>
Bug: https://github.com/pandas-dev/pandas/issues/38921, https://github.com/pandas-dev/pandas/issues/38798, https://github.com/pandas-dev/pandas/issues/41740, https://github.com/numpy/numpy/issues/19146
Forwarded: no

--- a/pandas/tests/io/parser/test_c_parser_only.py
+++ b/pandas/tests/io/parser/test_c_parser_only.py
@@ -17,6 +17,7 @@ import tarfile
 import numpy as np
 import pytest
 
+from pandas.compat import IS64
 from pandas.compat.numpy import np_version_gte1p24
 from pandas.errors import (
     ParserError,
@@ -29,6 +30,9 @@ from pandas import (
     concat,
 )
 import pandas._testing as tm
+import platform
+import re
+is_platform_x86 = bool(re.match("i.?86|x86",platform.uname()[4]))
 
 
 @pytest.mark.parametrize(
@@ -633,11 +637,13 @@ def test_float_precision_options(c_parse
 
     tm.assert_frame_equal(df, df2)
 
-    df3 = parser.read_csv(StringIO(s), float_precision="legacy")
-
-    assert not df.iloc[0, 0] == df3.iloc[0, 0]
-
     msg = "Unrecognized float_precision option: junk"
 
     with pytest.raises(ValueError, match=msg):
         parser.read_csv(StringIO(s), float_precision="junk")
+
+    df3 = parser.read_csv(StringIO(s), float_precision="legacy")
+    if is_platform_x86 and (not IS64) and (df.iloc[0, 0] == df3.iloc[0, 0]):
+        pytest.xfail(reason="maybe x87 extra precision")
+
+    assert not df.iloc[0, 0] == df3.iloc[0, 0]
--- a/pandas/tests/window/test_rolling.py
+++ b/pandas/tests/window/test_rolling.py
@@ -10,7 +10,11 @@ from pandas.compat import (
     IS64,
     is_platform_arm,
     is_platform_power,
+    IS64,
 )
+import platform
+import re
+is_platform_x86 = bool(re.match("i.?86|x86", platform.uname()[4]))
 
 from pandas import (
     DataFrame,
@@ -1176,7 +1180,8 @@ def test_rolling_sem(frame_or_series):
 
 
 @pytest.mark.xfail(
-    is_platform_arm() or is_platform_power(),
+    not (is_platform_x86 and IS64),
+    strict=False,
     reason="GH 38921",
 )
 @pytest.mark.parametrize(