diff --git a/pandas/tests/indexes/datetimes/test_datetime.py b/pandas/tests/indexes/datetimes/test_datetime.py index e0e5beaf48e20..50983dbd8db22 100644 --- a/pandas/tests/indexes/datetimes/test_datetime.py +++ b/pandas/tests/indexes/datetimes/test_datetime.py @@ -5,46 +5,13 @@ import pytest import pandas as pd -from pandas import DataFrame, DatetimeIndex, Index, NaT, Timestamp, date_range, offsets +from pandas import DataFrame, DatetimeIndex, Index, Timestamp, date_range, offsets import pandas._testing as tm randn = np.random.randn class TestDatetimeIndex: - def test_roundtrip_pickle_with_tz(self): - - # GH 8367 - # round-trip of timezone - index = date_range("20130101", periods=3, tz="US/Eastern", name="foo") - unpickled = tm.round_trip_pickle(index) - tm.assert_index_equal(index, unpickled) - - def test_pickle(self): - - # GH#4606 - p = tm.round_trip_pickle(NaT) - assert p is NaT - - idx = pd.to_datetime(["2013-01-01", NaT, "2014-01-06"]) - idx_p = tm.round_trip_pickle(idx) - assert idx_p[0] == idx[0] - assert idx_p[1] is NaT - assert idx_p[2] == idx[2] - - # GH#11002 - # don't infer freq - idx = date_range("1750-1-1", "2050-1-1", freq="7D") - idx_p = tm.round_trip_pickle(idx) - tm.assert_index_equal(idx, idx_p) - - def test_pickle_after_set_freq(self): - dti = date_range("20130101", periods=3, tz="US/Eastern", name="foo") - dti = dti._with_freq(None) - - res = tm.round_trip_pickle(dti) - tm.assert_index_equal(res, dti) - def test_reindex_preserves_tz_if_target_is_empty_list_or_array(self): # GH7774 index = date_range("20130101", periods=3, tz="US/Eastern") @@ -164,23 +131,6 @@ def test_append_nondatetimeindex(self): result = rng.append(idx) assert isinstance(result[0], Timestamp) - def test_map(self): - rng = date_range("1/1/2000", periods=10) - - f = lambda x: x.strftime("%Y%m%d") - result = rng.map(f) - exp = Index([f(x) for x in rng], dtype="