|
23 | 23 | from pandas.util import testing as tm
|
24 | 24 | from pandas.util.testing import assert_series_equal, _skip_if_has_locale
|
25 | 25 | from pandas import (isna, to_datetime, Timestamp, Series, DataFrame,
|
26 |
| - Index, DatetimeIndex, NaT, date_range, bdate_range, |
27 |
| - compat) |
| 26 | + Index, DatetimeIndex, NaT, date_range, compat) |
28 | 27 |
|
29 | 28 |
|
30 | 29 | class TestTimeConversionFormats(object):
|
@@ -735,24 +734,6 @@ def test_dataframe_dtypes(self, cache):
|
735 | 734 |
|
736 | 735 | class TestToDatetimeMisc(object):
|
737 | 736 |
|
738 |
| - @pytest.mark.parametrize('cache', [True, False]) |
739 |
| - def test_index_to_datetime(self, cache): |
740 |
| - idx = Index(['1/1/2000', '1/2/2000', '1/3/2000']) |
741 |
| - |
742 |
| - with tm.assert_produces_warning(FutureWarning, |
743 |
| - check_stacklevel=False): |
744 |
| - result = idx.to_datetime() |
745 |
| - expected = DatetimeIndex(pd.to_datetime(idx.values, cache=cache)) |
746 |
| - tm.assert_index_equal(result, expected) |
747 |
| - |
748 |
| - with tm.assert_produces_warning(FutureWarning, |
749 |
| - check_stacklevel=False): |
750 |
| - today = datetime.today() |
751 |
| - idx = Index([today], dtype=object) |
752 |
| - result = idx.to_datetime() |
753 |
| - expected = DatetimeIndex([today]) |
754 |
| - tm.assert_index_equal(result, expected) |
755 |
| - |
756 | 737 | @pytest.mark.parametrize('cache', [True, False])
|
757 | 738 | def test_to_datetime_iso8601(self, cache):
|
758 | 739 | result = to_datetime(["2012-01-01 00:00:00"], cache=cache)
|
@@ -888,12 +869,6 @@ def test_to_datetime_list_of_integers(self):
|
888 | 869 |
|
889 | 870 | tm.assert_index_equal(rng, result)
|
890 | 871 |
|
891 |
| - def test_to_datetime_freq(self): |
892 |
| - xp = bdate_range('2000-1-1', periods=10, tz='UTC') |
893 |
| - rs = xp.to_datetime() |
894 |
| - assert xp.freq == rs.freq |
895 |
| - assert xp.tzinfo == rs.tzinfo |
896 |
| - |
897 | 872 | def test_to_datetime_overflow(self):
|
898 | 873 | # gh-17637
|
899 | 874 | # we are overflowing Timedelta range here
|
|
0 commit comments