Skip to content

Commit 87cf295

Browse files
authored
TST: add test for non UTC datetime split #14042 (#32866)
1 parent 6236c98 commit 87cf295

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/indexes/datetimes/test_datetime.py

+8
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,11 @@ def test_index_map(self, name):
425425
((2018,), range(1, 7)), names=[name, name]
426426
)
427427
tm.assert_index_equal(index, exp_index)
428+
429+
def test_split_non_utc(self):
430+
# GH 14042
431+
indices = pd.date_range("2016-01-01 00:00:00+0200", freq="S", periods=10)
432+
result = np.split(indices, indices_or_sections=[])[0]
433+
expected = indices.copy()
434+
expected._set_freq(None)
435+
tm.assert_index_equal(result, expected)

0 commit comments

Comments
 (0)