Skip to content

Commit 07739aa

Browse files
ginggsjreback
authored andcommitted
Fix more tests expecting little-endian (#20738)
As in #14832, use = (native) instead of < (little-endian)
1 parent b9f826f commit 07739aa

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pandas/tests/dtypes/test_cast.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def testinfer_dtype_from_scalar_errors(self):
191191
(pd.Categorical(list('aabc')), 'category', True),
192192
(pd.Categorical([1, 2, 3]), 'category', True),
193193
(Timestamp('20160101'), np.object_, False),
194-
(np.datetime64('2016-01-01'), np.dtype('<M8[D]'), False),
194+
(np.datetime64('2016-01-01'), np.dtype('=M8[D]'), False),
195195
(pd.date_range('20160101', periods=3),
196-
np.dtype('<M8[ns]'), False),
196+
np.dtype('=M8[ns]'), False),
197197
(pd.date_range('20160101', periods=3, tz='US/Eastern'),
198198
'datetime64[ns, US/Eastern]', True),
199199
(pd.Series([1., 2, 3]), np.float64, False),

pandas/tests/frame/test_convert_to.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_to_records_with_unicode_column_names(self):
161161
expected = np.rec.array(
162162
[(0, 1.0)],
163163
dtype={"names": ["index", u"accented_name_é"],
164-
"formats": ['<i8', '<f8']}
164+
"formats": ['=i8', '=f8']}
165165
)
166166
tm.assert_almost_equal(result, expected)
167167

pandas/tests/indexes/period/test_formats.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_to_native_types():
1313

1414
# First, with no arguments.
1515
expected = np.array(['2017-01-01', '2017-01-02',
16-
'2017-01-03'], dtype='<U10')
16+
'2017-01-03'], dtype='=U10')
1717

1818
result = index.to_native_types()
1919
tm.assert_numpy_array_equal(result, expected)
@@ -23,14 +23,14 @@ def test_to_native_types():
2323
tm.assert_numpy_array_equal(result, expected)
2424

2525
# Make sure slicing works
26-
expected = np.array(['2017-01-01', '2017-01-03'], dtype='<U10')
26+
expected = np.array(['2017-01-01', '2017-01-03'], dtype='=U10')
2727

2828
result = index.to_native_types([0, 2])
2929
tm.assert_numpy_array_equal(result, expected)
3030

3131
# Make sure date formatting works
3232
expected = np.array(['01-2017-01', '01-2017-02',
33-
'01-2017-03'], dtype='<U10')
33+
'01-2017-03'], dtype='=U10')
3434

3535
result = index.to_native_types(date_format='%m-%Y-%d')
3636
tm.assert_numpy_array_equal(result, expected)

0 commit comments

Comments
 (0)