@@ -277,16 +277,9 @@ def test_irreg_hf(self):
277
277
_ , ax = self .plt .subplots ()
278
278
df2 = df .copy ()
279
279
df2 .index = df .index .astype (object )
280
- with tm .assert_produces_warning (FutureWarning , check_stacklevel = False ):
281
- # This warning will be emitted
282
- # pandas/core/frame.py:3216:
283
- # FutureWarning: Automatically casting object-dtype Index of datetimes
284
- # to DatetimeIndex is deprecated and will be removed in a future version.
285
- # Explicitly cast to DatetimeIndex instead.
286
- # return klass(values, index=self.index, name=name, fastpath=True)
287
- df2 .plot (ax = ax )
288
- diffs = Series (ax .get_lines ()[0 ].get_xydata ()[:, 0 ]).diff ()
289
- assert (np .fabs (diffs [1 :] - sec ) < 1e-8 ).all ()
280
+ df2 .plot (ax = ax )
281
+ diffs = Series (ax .get_lines ()[0 ].get_xydata ()[:, 0 ]).diff ()
282
+ assert (np .fabs (diffs [1 :] - sec ) < 1e-8 ).all ()
290
283
291
284
def test_irregular_datetime64_repr_bug (self ):
292
285
ser = tm .makeTimeSeries ()
@@ -997,16 +990,9 @@ def test_irreg_dtypes(self):
997
990
# np.datetime64
998
991
idx = date_range ("1/1/2000" , periods = 10 )
999
992
idx = idx [[0 , 2 , 5 , 9 ]].astype (object )
1000
- with tm .assert_produces_warning (FutureWarning , check_stacklevel = False ):
1001
- # This warning will be emitted
1002
- # pandas/core/frame.py:3216:
1003
- # FutureWarning: Automatically casting object-dtype Index of datetimes
1004
- # to DatetimeIndex is deprecated and will be removed in a future version.
1005
- # Explicitly cast to DatetimeIndex instead.
1006
- # return klass(values, index=self.index, name=name, fastpath=True)
1007
- df = DataFrame (np .random .randn (len (idx ), 3 ), idx )
1008
- _ , ax = self .plt .subplots ()
1009
- _check_plot_works (df .plot , ax = ax )
993
+ df = DataFrame (np .random .randn (len (idx ), 3 ), idx )
994
+ _ , ax = self .plt .subplots ()
995
+ _check_plot_works (df .plot , ax = ax )
1010
996
1011
997
def test_time (self ):
1012
998
t = datetime (1 , 1 , 1 , 3 , 30 , 0 )
0 commit comments