Skip to content

Commit 325e4b6

Browse files
authored
tests added for dtype comparison with fixture (#44840)
1 parent b71761d commit 325e4b6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pandas/tests/dtypes/test_common.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import pandas as pd
2222
import pandas._testing as tm
23+
from pandas.api.types import pandas_dtype
2324
from pandas.arrays import SparseArray
2425

2526

@@ -400,6 +401,23 @@ def test_is_int64_dtype(dtype):
400401
assert com.is_int64_dtype(dtype)
401402

402403

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+
403421
@pytest.mark.parametrize(
404422
"dtype",
405423
[

0 commit comments

Comments
 (0)