15
15
16
16
class TestTypes (Base , tm .TestCase ):
17
17
18
- allowed = ['is_any_int_dtype' , ' is_bool' , 'is_bool_dtype' ,
18
+ allowed = ['is_bool' , 'is_bool_dtype' ,
19
19
'is_categorical' , 'is_categorical_dtype' , 'is_complex' ,
20
20
'is_complex_dtype' , 'is_datetime64_any_dtype' ,
21
21
'is_datetime64_dtype' , 'is_datetime64_ns_dtype' ,
22
22
'is_datetime64tz_dtype' , 'is_datetimetz' , 'is_dtype_equal' ,
23
23
'is_extension_type' , 'is_float' , 'is_float_dtype' ,
24
- 'is_floating_dtype' , ' is_int64_dtype' , 'is_integer' ,
24
+ 'is_int64_dtype' , 'is_integer' ,
25
25
'is_integer_dtype' , 'is_number' , 'is_numeric_dtype' ,
26
26
'is_object_dtype' , 'is_scalar' , 'is_sparse' ,
27
27
'is_string_dtype' , 'is_signed_integer_dtype' ,
@@ -33,12 +33,13 @@ class TestTypes(Base, tm.TestCase):
33
33
'is_list_like' , 'is_hashable' ,
34
34
'is_named_tuple' , 'is_sequence' ,
35
35
'pandas_dtype' , 'union_categoricals' , 'infer_dtype' ]
36
+ deprecated = ['is_any_int_dtype' , 'is_floating_dtype' ]
36
37
dtypes = ['CategoricalDtype' , 'DatetimeTZDtype' ,
37
38
'PeriodDtype' , 'IntervalDtype' ]
38
39
39
40
def test_types (self ):
40
41
41
- self .check (types , self .allowed + self .dtypes )
42
+ self .check (types , self .allowed + self .dtypes + self . deprecated )
42
43
43
44
def check_deprecation (self , fold , fnew ):
44
45
with tm .assert_produces_warning (DeprecationWarning ):
@@ -87,6 +88,13 @@ def test_removed_from_core_common(self):
87
88
'ensure_float' ]:
88
89
pytest .raises (AttributeError , lambda : getattr (com , t ))
89
90
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
+
90
98
91
99
def test_moved_infer_dtype ():
92
100
0 commit comments