Skip to content

Commit bce3087

Browse files
committed
BUG: Add check to ignore dytype difference
- If int dtype is different we are ignoring the difference - so added check to set check_exact to true only when dtype is same
1 parent 4eabcd6 commit bce3087

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/_testing/asserters.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,11 @@ def assert_series_equal(
921921
else:
922922
assert_attr_equal("dtype", left, right, obj=f"Attributes of {obj}")
923923

924-
if is_integer_dtype(left.dtype) and is_integer_dtype(right.dtype):
924+
if (
925+
is_integer_dtype(left.dtype)
926+
and is_integer_dtype(right.dtype)
927+
and left.dtype == right.dtype
928+
):
925929
check_exact = True
926930

927931
if check_exact and is_numeric_dtype(left.dtype) and is_numeric_dtype(right.dtype):

0 commit comments

Comments
 (0)