From 76d2522f13765b8f9e1f1383a84b5a2361de191b Mon Sep 17 00:00:00 2001 From: andjhall Date: Thu, 14 Apr 2022 15:26:51 -0400 Subject: [PATCH] Revert "Added test for github issue #33830 to test that categorical was preserving DateTimeIndex freq attribute" This reverts commit e4b8cbfec4507db2a64d018d35232bb85c51328a. --- pandas/tests/indexes/datetimes/test_constructors.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pandas/tests/indexes/datetimes/test_constructors.py b/pandas/tests/indexes/datetimes/test_constructors.py index c16e29d7e34b7..b1e764ceb7009 100644 --- a/pandas/tests/indexes/datetimes/test_constructors.py +++ b/pandas/tests/indexes/datetimes/test_constructors.py @@ -8,7 +8,6 @@ import dateutil import numpy as np -from pandas._testing.asserters import assert_equal import pytest import pytz @@ -85,16 +84,6 @@ def test_categorical_preserves_tz(self): result = DatetimeIndex(obj) tm.assert_index_equal(result, dti) - def test_categorical_preserves_freq(self): - # GH33830 freq retention in categorical - dti = pd.date_range('2016-01-01', periods=5) - expected = dti.freq - - cat = pd.Categorical(dti) - result = cat.categories.freq - - assert expected == result - def test_dti_with_period_data_raises(self): # GH#23675 data = pd.PeriodIndex(["2016Q1", "2016Q2"], freq="Q")