Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: partly https://bugs.debian.org/
1026351
Forwarded: no
Gbp-Pq: Name tests_dont_assume_64bit.patch
# Putting this into a DatetimeArray/TimedeltaArray
# would incorrectly be interpreted as NaT
raise OverflowError
- # error: Incompatible return value type (got "signedinteger[_64Bit]",
- # expected "int")
- return result # type: ignore[return-value]
+ return int(result)
except (FloatingPointError, OverflowError):
# with endpoint negative and addend positive we risk
# FloatingPointError; with reversed signed we risk OverflowError
i64max = np.uint64(i8max)
assert result > i64max
if result <= i64max + np.uint64(stride):
- # error: Incompatible return value type (got "unsignedinteger", expected
- # "int")
- return result # type: ignore[return-value]
+ return int(result)
raise OutOfBoundsDatetime(
f"Cannot generate range with {side}={endpoint} and periods={periods}"
from datetime import datetime
from io import StringIO
import itertools
+import sys
import numpy as np
import pytest
tm.assert_frame_equal(recons, df)
@pytest.mark.slow
+ @pytest.mark.xfail(condition=sys.maxsize<2**33, reason="assumes default int is int64", strict=False)
def test_unstack_number_of_levels_larger_than_int32(self, monkeypatch):
# GH#20601
# GH 26314: Change ValueError to PerformanceWarning
timedelta,
)
from itertools import product
+import sys
import numpy as np
import pytest
tm.assert_frame_equal(result, expected)
@pytest.mark.slow
+ @pytest.mark.xfail(condition=sys.maxsize<2**33, reason="assumes default int is int64", strict=False)
def test_pivot_number_of_levels_larger_than_int32(self, monkeypatch):
# GH 20601
# GH 26314: Change ValueError to PerformanceWarning
def test_round_numpy_with_nan(self, any_float_dtype):
# See GH#14197
ser = Series([1.53, np.nan, 0.06], dtype=any_float_dtype)
- with tm.assert_produces_warning(None):
- result = ser.round()
+ result = ser.round() # on armhf, numpy warns
expected = Series([2.0, np.nan, 0.0], dtype=any_float_dtype)
tm.assert_series_equal(result, expected)
for name in ["numpy", "pytz", "dateutil"]:
assert name in output
-
+@pytest.mark.xfail(condition=sys.maxsize<2**33, reason="different nativesize-int vs int64 type rules", strict=False)
def test_frame_setitem_dask_array_into_new_col():
# GH#47128
lexsort_indexer,
nargsort,
)
+import sys
@pytest.fixture
tm.assert_numpy_array_equal(result, np.array(exp), check_dtype=False)
+@pytest.mark.xfail(condition=sys.maxsize<2**33, reason="assumes default int is int64", strict=False)#used to be just the first one but that's been split into several
class TestMerge:
def test_int64_overflow_outer_merge(self):
# #2690, combinatorial explosion