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
|
Description: Avoid year 2038 overflow in test
https://tests.reproducible-builds.org/debian/rbuild/unstable/i386/pandas_1.1.4+dfsg-1.rbuild.log.gz
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no
--- a/pandas/tests/indexes/datetimes/test_ops.py
+++ b/pandas/tests/indexes/datetimes/test_ops.py
@@ -2,6 +2,7 @@ from datetime import datetime
import numpy as np
import pytest
+import sys
import pandas as pd
from pandas import (
@@ -122,7 +123,7 @@ class TestDatetimeIndexOps:
"microsecond",
],
):
- idx = pd.date_range(start="2013-04-01", periods=30, freq=freq, tz=tz)
+ idx = pd.date_range(start="2013-04-01", periods=10 if (sys.maxsize<2**33 and freq=='A') else 30, freq=freq, tz=tz)
assert idx.resolution == expected
def test_value_counts_unique(self, tz_naive_fixture):
|