Skip to content

Commit 4db92ac

Browse files
author
Matt Roeschke
committed
add test for dti
1 parent 766ae93 commit 4db92ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/indexes/datetimes/test_construction.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,12 @@ def test_construction_from_replaced_timestamps_with_dst(self):
521521
tz='Australia/Melbourne')
522522
tm.assert_index_equal(result, expected)
523523

524+
def test_construction_with_tz_and_tz_aware_dti(self):
525+
# GH 23579
526+
dti = date_range('2016-01-01', periods=3, tz='US/Central')
527+
with pytest.raises(TypeError):
528+
DatetimeIndex(dti, tz='Asia/Tokyo')
529+
524530

525531
class TestTimeSeries(object):
526532

0 commit comments

Comments
 (0)