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