diff --git a/pandas/conftest.py b/pandas/conftest.py index 35a6b5df35ddc6..411dbfe0888270 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -364,7 +364,7 @@ def unique_nulls_fixture(request): unique_nulls_fixture2 = unique_nulls_fixture -TIMEZONES = [None, 'UTC', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific', +TIMEZONES = [None, 'UTC', 'Europe/London', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific', 'dateutil/Asia/Singapore', tzutc(), tzlocal(), FixedOffset(300), FixedOffset(0), FixedOffset(-300)] diff --git a/pandas/tests/indexes/datetimes/test_timezones.py b/pandas/tests/indexes/datetimes/test_timezones.py index 8bcc9296cb010b..ed760b7c142ab5 100644 --- a/pandas/tests/indexes/datetimes/test_timezones.py +++ b/pandas/tests/indexes/datetimes/test_timezones.py @@ -442,15 +442,13 @@ def test_dti_tz_localize_utc_conversion(self, tz): ]) def test_dti_tz_localize_roundtrip(self, tz_aware_fixture, idx): tz = tz_aware_fixture - localized = idx.tz_localize(tz) - expected = date_range(start=idx[0], end=idx[-1], freq=idx.freq, - tz=tz) - tm.assert_index_equal(localized, expected) + localized = idx.tz_localize(tz, ambiguous='NaT') + with pytest.raises(TypeError): localized.tz_localize(tz) reset = localized.tz_localize(None) - tm.assert_index_equal(reset, idx) + assert reset.difference(idx).dropna().empty assert reset.tzinfo is None def test_dti_tz_localize_naive(self):