@@ -377,39 +377,6 @@ def test_dt_other_accessors(self, accessor):
377
377
expected = getattr (datetimes .dt , accessor )
378
378
tm .assert_series_equal (result , expected )
379
379
380
- def test_dt_tz_localize (self , tz_aware_fixture ):
381
- # GH 27952
382
- tz = tz_aware_fixture
383
- datetimes = pd .Series (
384
- ["2019-01-01" , "2019-01-01" , "2019-01-02" ], dtype = "datetime64[ns]"
385
- )
386
- categorical = datetimes .astype ("category" )
387
- result = categorical .dt .tz_localize (tz )
388
- expected = datetimes .dt .tz_localize (tz )
389
- tm .assert_series_equal (result , expected )
390
-
391
- def test_dt_tz_convert (self , tz_aware_fixture ):
392
- # GH 27952
393
- tz = tz_aware_fixture
394
- datetimes = pd .Series (
395
- ["2019-01-01" , "2019-01-01" , "2019-01-02" ], dtype = "datetime64[ns, MET]"
396
- )
397
- categorical = datetimes .astype ("category" )
398
- result = categorical .dt .tz_convert (tz )
399
- expected = datetimes .dt .tz_convert (tz )
400
- tm .assert_series_equal (result , expected )
401
-
402
- @pytest .mark .parametrize ("accessor" , ["year" , "month" , "day" ])
403
- def test_dt_other_accessors (self , accessor ):
404
- # GH 27952
405
- datetimes = pd .Series (
406
- ["2018-01-01" , "2018-01-01" , "2019-01-02" ], dtype = "datetime64[ns]"
407
- )
408
- categorical = datetimes .astype ("category" )
409
- result = getattr (categorical .dt , accessor )
410
- expected = getattr (datetimes .dt , accessor )
411
- tm .assert_series_equal (result , expected )
412
-
413
380
def test_dt_accessor_no_new_attributes (self ):
414
381
# https://github.com/pandas-dev/pandas/issues/10673
415
382
s = Series (date_range ("20130101" , periods = 5 , freq = "D" ))
0 commit comments