@@ -166,7 +166,7 @@ def test_is_dtype(self, dtype):
166166
167167 def test_basic (self , dtype ):
168168 msg = "is_categorical_dtype is deprecated"
169- with tm .assert_produces_warning (FutureWarning , match = msg ):
169+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
170170 assert is_categorical_dtype (dtype )
171171
172172 factor = Categorical (["a" , "b" , "b" , "a" , "a" , "c" , "c" , "c" ])
@@ -291,7 +291,7 @@ def test_subclass(self):
291291
292292 def test_compat (self , dtype ):
293293 msg = "is_datetime64tz_dtype is deprecated"
294- with tm .assert_produces_warning (FutureWarning , match = msg ):
294+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
295295 assert is_datetime64tz_dtype (dtype )
296296 assert is_datetime64tz_dtype ("datetime64[ns, US/Eastern]" )
297297 assert is_datetime64_any_dtype (dtype )
@@ -352,14 +352,14 @@ def test_equality(self, dtype):
352352
353353 def test_basic (self , dtype ):
354354 msg = "is_datetime64tz_dtype is deprecated"
355- with tm .assert_produces_warning (FutureWarning , match = msg ):
355+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
356356 assert is_datetime64tz_dtype (dtype )
357357
358358 dr = date_range ("20130101" , periods = 3 , tz = "US/Eastern" )
359359 s = Series (dr , name = "A" )
360360
361361 # dtypes
362- with tm .assert_produces_warning (FutureWarning , match = msg ):
362+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
363363 assert is_datetime64tz_dtype (s .dtype )
364364 assert is_datetime64tz_dtype (s )
365365 assert not is_datetime64tz_dtype (np .dtype ("float64" ))
@@ -530,7 +530,7 @@ def test_equality(self, dtype):
530530
531531 def test_basic (self , dtype ):
532532 msg = "is_period_dtype is deprecated"
533- with tm .assert_produces_warning (FutureWarning , match = msg ):
533+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
534534 assert is_period_dtype (dtype )
535535
536536 pidx = pd .period_range ("2013-01-01 09:00" , periods = 5 , freq = "H" )
@@ -618,7 +618,7 @@ def test_construction(self, subtype):
618618 i = IntervalDtype (subtype , closed = "right" )
619619 assert i .subtype == np .dtype ("int64" )
620620 msg = "is_interval_dtype is deprecated"
621- with tm .assert_produces_warning (FutureWarning , match = msg ):
621+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
622622 assert is_interval_dtype (i )
623623
624624 @pytest .mark .parametrize (
@@ -641,7 +641,7 @@ def test_construction_generic(self, subtype):
641641 i = IntervalDtype (subtype )
642642 assert i .subtype is None
643643 msg = "is_interval_dtype is deprecated"
644- with tm .assert_produces_warning (FutureWarning , match = msg ):
644+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
645645 assert is_interval_dtype (i )
646646
647647 @pytest .mark .parametrize (
@@ -814,7 +814,7 @@ def test_name_repr_generic(self, subtype):
814814
815815 def test_basic (self , dtype ):
816816 msg = "is_interval_dtype is deprecated"
817- with tm .assert_produces_warning (FutureWarning , match = msg ):
817+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
818818 assert is_interval_dtype (dtype )
819819
820820 ii = IntervalIndex .from_breaks (range (3 ))
@@ -829,7 +829,7 @@ def test_basic(self, dtype):
829829
830830 def test_basic_dtype (self ):
831831 msg = "is_interval_dtype is deprecated"
832- with tm .assert_produces_warning (FutureWarning , match = msg ):
832+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
833833 assert is_interval_dtype ("interval[int64, both]" )
834834 assert is_interval_dtype (IntervalIndex .from_tuples ([(0 , 1 )]))
835835 assert is_interval_dtype (IntervalIndex .from_breaks (np .arange (4 )))
@@ -1158,7 +1158,7 @@ def test_is_dtype_no_warning(check):
11581158 or check is is_datetime64tz_dtype
11591159 or check is is_period_dtype
11601160 ):
1161- warn = FutureWarning
1161+ warn = DeprecationWarning
11621162
11631163 with tm .assert_produces_warning (warn , match = msg ):
11641164 check (data )
0 commit comments