@@ -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" ])
@@ -291,7 +291,7 @@ def test_subclass(self):
291
291
292
292
def test_compat (self , dtype ):
293
293
msg = "is_datetime64tz_dtype is deprecated"
294
- with tm .assert_produces_warning (FutureWarning , match = msg ):
294
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
295
295
assert is_datetime64tz_dtype (dtype )
296
296
assert is_datetime64tz_dtype ("datetime64[ns, US/Eastern]" )
297
297
assert is_datetime64_any_dtype (dtype )
@@ -352,14 +352,14 @@ def test_equality(self, dtype):
352
352
353
353
def test_basic (self , dtype ):
354
354
msg = "is_datetime64tz_dtype is deprecated"
355
- with tm .assert_produces_warning (FutureWarning , match = msg ):
355
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
356
356
assert is_datetime64tz_dtype (dtype )
357
357
358
358
dr = date_range ("20130101" , periods = 3 , tz = "US/Eastern" )
359
359
s = Series (dr , name = "A" )
360
360
361
361
# dtypes
362
- with tm .assert_produces_warning (FutureWarning , match = msg ):
362
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
363
363
assert is_datetime64tz_dtype (s .dtype )
364
364
assert is_datetime64tz_dtype (s )
365
365
assert not is_datetime64tz_dtype (np .dtype ("float64" ))
@@ -530,7 +530,7 @@ def test_equality(self, dtype):
530
530
531
531
def test_basic (self , dtype ):
532
532
msg = "is_period_dtype is deprecated"
533
- with tm .assert_produces_warning (FutureWarning , match = msg ):
533
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
534
534
assert is_period_dtype (dtype )
535
535
536
536
pidx = pd .period_range ("2013-01-01 09:00" , periods = 5 , freq = "H" )
@@ -618,7 +618,7 @@ def test_construction(self, subtype):
618
618
i = IntervalDtype (subtype , closed = "right" )
619
619
assert i .subtype == np .dtype ("int64" )
620
620
msg = "is_interval_dtype is deprecated"
621
- with tm .assert_produces_warning (FutureWarning , match = msg ):
621
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
622
622
assert is_interval_dtype (i )
623
623
624
624
@pytest .mark .parametrize (
@@ -641,7 +641,7 @@ def test_construction_generic(self, subtype):
641
641
i = IntervalDtype (subtype )
642
642
assert i .subtype is None
643
643
msg = "is_interval_dtype is deprecated"
644
- with tm .assert_produces_warning (FutureWarning , match = msg ):
644
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
645
645
assert is_interval_dtype (i )
646
646
647
647
@pytest .mark .parametrize (
@@ -814,7 +814,7 @@ def test_name_repr_generic(self, subtype):
814
814
815
815
def test_basic (self , dtype ):
816
816
msg = "is_interval_dtype is deprecated"
817
- with tm .assert_produces_warning (FutureWarning , match = msg ):
817
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
818
818
assert is_interval_dtype (dtype )
819
819
820
820
ii = IntervalIndex .from_breaks (range (3 ))
@@ -829,7 +829,7 @@ def test_basic(self, dtype):
829
829
830
830
def test_basic_dtype (self ):
831
831
msg = "is_interval_dtype is deprecated"
832
- with tm .assert_produces_warning (FutureWarning , match = msg ):
832
+ with tm .assert_produces_warning (DeprecationWarning , match = msg ):
833
833
assert is_interval_dtype ("interval[int64, both]" )
834
834
assert is_interval_dtype (IntervalIndex .from_tuples ([(0 , 1 )]))
835
835
assert is_interval_dtype (IntervalIndex .from_breaks (np .arange (4 )))
@@ -1158,7 +1158,7 @@ def test_is_dtype_no_warning(check):
1158
1158
or check is is_datetime64tz_dtype
1159
1159
or check is is_period_dtype
1160
1160
):
1161
- warn = FutureWarning
1161
+ warn = DeprecationWarning
1162
1162
1163
1163
with tm .assert_produces_warning (warn , match = msg ):
1164
1164
check (data )
0 commit comments