1515
1616class TestTypes (Base , tm .TestCase ):
1717
18- allowed = ['is_any_int_dtype' , ' is_bool' , 'is_bool_dtype' ,
18+ allowed = ['is_bool' , 'is_bool_dtype' ,
1919 'is_categorical' , 'is_categorical_dtype' , 'is_complex' ,
2020 'is_complex_dtype' , 'is_datetime64_any_dtype' ,
2121 'is_datetime64_dtype' , 'is_datetime64_ns_dtype' ,
2222 'is_datetime64tz_dtype' , 'is_datetimetz' , 'is_dtype_equal' ,
2323 'is_extension_type' , 'is_float' , 'is_float_dtype' ,
24- 'is_floating_dtype' , ' is_int64_dtype' , 'is_integer' ,
24+ 'is_int64_dtype' , 'is_integer' ,
2525 'is_integer_dtype' , 'is_number' , 'is_numeric_dtype' ,
2626 'is_object_dtype' , 'is_scalar' , 'is_sparse' ,
2727 'is_string_dtype' , 'is_signed_integer_dtype' ,
@@ -33,12 +33,13 @@ class TestTypes(Base, tm.TestCase):
3333 'is_list_like' , 'is_hashable' ,
3434 'is_named_tuple' , 'is_sequence' ,
3535 'pandas_dtype' , 'union_categoricals' , 'infer_dtype' ]
36+ deprecated = ['is_any_int_dtype' , 'is_floating_dtype' ]
3637 dtypes = ['CategoricalDtype' , 'DatetimeTZDtype' ,
3738 'PeriodDtype' , 'IntervalDtype' ]
3839
3940 def test_types (self ):
4041
41- self .check (types , self .allowed + self .dtypes )
42+ self .check (types , self .allowed + self .dtypes + self . deprecated )
4243
4344 def check_deprecation (self , fold , fnew ):
4445 with tm .assert_produces_warning (DeprecationWarning ):
@@ -87,6 +88,13 @@ def test_removed_from_core_common(self):
8788 'ensure_float' ]:
8889 pytest .raises (AttributeError , lambda : getattr (com , t ))
8990
91+ def test_deprecated_from_api_types (self ):
92+
93+ for t in ['is_any_int_dtype' , 'is_floating_dtype' ]:
94+ with tm .assert_produces_warning (FutureWarning ,
95+ check_stacklevel = False ):
96+ getattr (types , t )(1 )
97+
9098
9199def test_moved_infer_dtype ():
92100
0 commit comments