Don't require 32-bit to be time32
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Tue, 28 Jan 2025 22:18:06 +0000 (22:18 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 28 Jan 2025 22:18:06 +0000 (22:18 +0000)
Debian armhf/armel (but not i386) are now time64

Author: Graham Inggs, Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1068104
Forwarded: no

Gbp-Pq: Name 1068104_time64.patch

pandas/tests/indexes/datetimes/methods/test_resolution.py
pandas/tests/io/sas/test_sas7bdat.py
pandas/tests/tools/test_to_timedelta.py
pandas/tests/tseries/offsets/test_common.py

index 8399fafbbaff20463901a8008555492bc8b5c5f5..1400d074900e036577b01759df2c0f295a8933ad 100644 (file)
@@ -24,7 +24,7 @@ def test_dti_resolution(request, tz_naive_fixture, freq, expected):
     tz = tz_naive_fixture
     if freq == "YE" and not IS64 and isinstance(tz, tzlocal):
         request.applymarker(
-            pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038")
+            pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038", strict=False)
         )
 
     idx = date_range(start="2013-04-01", periods=30, freq=freq, tz=tz)
index b71896c77ffb5872beb98d3914e6195b69855703..d59100e5149c41293dba7dbc960c5781c470575b 100644 (file)
@@ -15,6 +15,9 @@ import pandas as pd
 import pandas._testing as tm
 
 from pandas.io.sas.sas7bdat import SAS7BDATReader
+import platform
+import re
+is_platform_x86_32 = bool(re.match("i.?86|x86", platform.uname()[4])) and not IS64
 
 
 @pytest.fixture
@@ -202,7 +205,7 @@ def test_date_time(datapath):
     res = df0["DateTimeHi"].astype("M8[us]").dt.round("ms")
     df0["DateTimeHi"] = res.astype("M8[ms]")
 
-    if not IS64:
+    if is_platform_x86_32:
         # No good reason for this, just what we get on the CI
         df0.loc[0, "DateTimeHi"] += np.timedelta64(1, "ms")
         df0.loc[[2, 3], "DateTimeHi"] -= np.timedelta64(1, "ms")
@@ -297,7 +300,7 @@ def test_max_sas_date(datapath):
         columns=["text", "dt_as_float", "dt_as_dt", "date_as_float", "date_as_date"],
     )
 
-    if not IS64:
+    if is_platform_x86_32:
         # No good reason for this, just what we get on the CI
         expected.loc[:, "dt_as_dt"] -= np.timedelta64(1, "ms")
 
@@ -340,7 +343,7 @@ def test_max_sas_date_iterator(datapath):
             columns=col_order,
         ),
     ]
-    if not IS64:
+    if is_platform_x86_32:
         # No good reason for this, just what we get on the CI
         expected[0].loc[0, "dt_as_dt"] -= np.timedelta64(1, "ms")
         expected[1].loc[0, "dt_as_dt"] -= np.timedelta64(1, "ms")
@@ -371,7 +374,7 @@ def test_null_date(datapath):
             ),
         },
     )
-    if not IS64:
+    if is_platform_x86_32:
         # No good reason for this, just what we get on the CI
         expected.loc[0, "datetimecol"] -= np.timedelta64(1, "ms")
     tm.assert_frame_equal(df, expected)
index b67694f1c58c7016221ed629358e8867b2a1534a..5a75988e4ff80726bcde64cd66a66f3b9343db49 100644 (file)
@@ -244,7 +244,7 @@ class TestTimedeltas:
         actual = to_timedelta([val])
         assert actual[0]._value == np.timedelta64("NaT").astype("int64")
 
-    @pytest.mark.xfail(not IS64, reason="Floating point error")
+    @pytest.mark.xfail(not IS64, reason="Floating point error", strict=False)
     def test_to_timedelta_float(self):
         # https://github.com/pandas-dev/pandas/issues/25077
         arr = np.arange(0, 1, 1e-6)[-10:]
index aa4e22f71ad66147d5b9893ead4dc250d1de0ed3..03334da9de8f72d77d394b5230dd1880ce6a5987 100644 (file)
@@ -143,7 +143,7 @@ def test_apply_out_of_range(request, tz_naive_fixture, _offset):
             # If we hit OutOfBoundsDatetime on non-64 bit machines
             # we'll drop out of the try clause before the next test
             request.applymarker(
-                pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038")
+                pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038", strict=False)
             )
         elif (
             isinstance(tz, tzlocal)