Skip to content

Commit 38a6287

Browse files
Debian Science Teamrebecca-palmer
authored andcommitted
Don't assume little-endian in test references
Author: Rebecca N. Palmer <[email protected]> Forwarded: no Gbp-Pq: Name tests_dont_assume_endian.patch
1 parent f2ff387 commit 38a6287

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/indexes/interval/test_constructors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import pandas._testing as tm
2424
from pandas.core.arrays import IntervalArray
2525
import pandas.core.common as com
26-
26+
from pandas.compat import is_platform_little_endian
2727

2828
@pytest.fixture(params=[None, "foo"])
2929
def name(request):
@@ -44,12 +44,12 @@ class ConstructorTests:
4444
(Index(np.arange(-10, 11, dtype=np.int64)), np.int64),
4545
(Index(np.arange(10, 31, dtype=np.uint64)), np.uint64),
4646
(Index(np.arange(20, 30, 0.5), dtype=np.float64), np.float64),
47-
(date_range("20180101", periods=10), "<M8[ns]"),
47+
(date_range("20180101", periods=10), "<M8[ns]" if is_platform_little_endian() else ">M8[ns]"),
4848
(
4949
date_range("20180101", periods=10, tz="US/Eastern"),
5050
"datetime64[ns, US/Eastern]",
5151
),
52-
(timedelta_range("1 day", periods=10), "<m8[ns]"),
52+
(timedelta_range("1 day", periods=10), "<m8[ns]" if is_platform_little_endian() else ">m8[ns]"),
5353
]
5454
)
5555
def breaks_and_expected_subtype(self, request):

0 commit comments

Comments
 (0)