@@ -166,7 +166,7 @@ def test_is_dtype(self, dtype):
166
166
167
167
def test_basic (self , dtype ):
168
168
msg = "is_categorical_dtype is deprecated"
169
- with tm .assert_produces_warning (FutureWarning , match = msg ):
169
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
170
170
assert is_categorical_dtype (dtype )
171
171
172
172
factor = Categorical (["a" , "b" , "b" , "a" , "a" , "c" , "c" , "c" ])
@@ -292,7 +292,7 @@ def test_subclass(self):
292
292
293
293
def test_compat (self , dtype ):
294
294
msg = "is_datetime64tz_dtype is deprecated"
295
- with tm .assert_produces_warning (FutureWarning , match = msg ):
295
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
296
296
assert is_datetime64tz_dtype (dtype )
297
297
assert is_datetime64tz_dtype ("datetime64[ns, US/Eastern]" )
298
298
assert is_datetime64_any_dtype (dtype )
@@ -353,14 +353,14 @@ def test_equality(self, dtype):
353
353
354
354
def test_basic (self , dtype ):
355
355
msg = "is_datetime64tz_dtype is deprecated"
356
- with tm .assert_produces_warning (FutureWarning , match = msg ):
356
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
357
357
assert is_datetime64tz_dtype (dtype )
358
358
359
359
dr = date_range ("20130101" , periods = 3 , tz = "US/Eastern" )
360
360
s = Series (dr , name = "A" )
361
361
362
362
# dtypes
363
- with tm .assert_produces_warning (FutureWarning , match = msg ):
363
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
364
364
assert is_datetime64tz_dtype (s .dtype )
365
365
assert is_datetime64tz_dtype (s )
366
366
assert not is_datetime64tz_dtype (np .dtype ("float64" ))
@@ -531,7 +531,7 @@ def test_equality(self, dtype):
531
531
532
532
def test_basic (self , dtype ):
533
533
msg = "is_period_dtype is deprecated"
534
- with tm .assert_produces_warning (FutureWarning , match = msg ):
534
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
535
535
assert is_period_dtype (dtype )
536
536
537
537
pidx = pd .period_range ("2013-01-01 09:00" , periods = 5 , freq = "h" )
@@ -619,7 +619,7 @@ def test_construction(self, subtype):
619
619
i = IntervalDtype (subtype , closed = "right" )
620
620
assert i .subtype == np .dtype ("int64" )
621
621
msg = "is_interval_dtype is deprecated"
622
- with tm .assert_produces_warning (FutureWarning , match = msg ):
622
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
623
623
assert is_interval_dtype (i )
624
624
625
625
@pytest .mark .parametrize (
@@ -642,7 +642,7 @@ def test_construction_generic(self, subtype):
642
642
i = IntervalDtype (subtype )
643
643
assert i .subtype is None
644
644
msg = "is_interval_dtype is deprecated"
645
- with tm .assert_produces_warning (FutureWarning , match = msg ):
645
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
646
646
assert is_interval_dtype (i )
647
647
648
648
@pytest .mark .parametrize (
@@ -815,7 +815,7 @@ def test_name_repr_generic(self, subtype):
815
815
816
816
def test_basic (self , dtype ):
817
817
msg = "is_interval_dtype is deprecated"
818
- with tm .assert_produces_warning (FutureWarning , match = msg ):
818
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
819
819
assert is_interval_dtype (dtype )
820
820
821
821
ii = IntervalIndex .from_breaks (range (3 ))
@@ -830,7 +830,7 @@ def test_basic(self, dtype):
830
830
831
831
def test_basic_dtype (self ):
832
832
msg = "is_interval_dtype is deprecated"
833
- with tm .assert_produces_warning (FutureWarning , match = msg ):
833
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
834
834
assert is_interval_dtype ("interval[int64, both]" )
835
835
assert is_interval_dtype (IntervalIndex .from_tuples ([(0 , 1 )]))
836
836
assert is_interval_dtype (IntervalIndex .from_breaks (np .arange (4 )))
@@ -1178,7 +1178,7 @@ def test_is_dtype_no_warning(check):
1178
1178
or check is is_datetime64tz_dtype
1179
1179
or check is is_period_dtype
1180
1180
):
1181
- warn = FutureWarning
1181
+ warn = DeprecationWarning
1182
1182
1183
1183
with tm .assert_produces_warning (warn , match = msg ):
1184
1184
check (data )
0 commit comments