Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pandas/tests/indexes/datetimes/test_date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,16 @@ def test_date_range_with_tz(self, tzstr):

assert stamp == rng[1]

def test_date_range_same_tz_reindex(self):
# GH 32740
a = date_range('2010-01-01', '2010-01-02', periods=24, tz='utc')
b = date_range('2010-01-01', '2010-01-02', periods=23, tz='utc')
msg = (
"date range convertion must have same timezone"
)
with pytest.raises(ValueError, match=msg):
a.reindex(b, method='nearest', tolerance=timedelta(seconds=20))


class TestGenRangeGeneration:
def test_generate(self):
Expand Down