File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import pandas as pd
22
22
import pandas ._testing as tm
23
+ from pandas .api .types import pandas_dtype
23
24
from pandas .arrays import SparseArray
24
25
25
26
@@ -400,6 +401,23 @@ def test_is_int64_dtype(dtype):
400
401
assert com .is_int64_dtype (dtype )
401
402
402
403
404
+ def test_type_comparison_with_numeric_ea_dtype (any_numeric_ea_dtype ):
405
+ # GH#43038
406
+ assert pandas_dtype (any_numeric_ea_dtype ) == any_numeric_ea_dtype
407
+
408
+
409
+ def test_type_comparison_with_real_numpy_dtype (any_real_numpy_dtype ):
410
+ # GH#43038
411
+ assert pandas_dtype (any_real_numpy_dtype ) == any_real_numpy_dtype
412
+
413
+
414
+ def test_type_comparison_with_signed_int_ea_dtype_and_signed_int_numpy_dtype (
415
+ any_signed_int_ea_dtype , any_signed_int_numpy_dtype
416
+ ):
417
+ # GH#43038
418
+ assert not pandas_dtype (any_signed_int_ea_dtype ) == any_signed_int_numpy_dtype
419
+
420
+
403
421
@pytest .mark .parametrize (
404
422
"dtype" ,
405
423
[
You can’t perform that action at this time.
0 commit comments