Skip to content

Commit 0c2f692

Browse files
Preserve semantics but keep mypy happy for assert_index_equal
1 parent daa9c87 commit 0c2f692

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/util/testing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,8 @@ def assert_equal(
14391439
__tracebackhide__ = True
14401440

14411441
if isinstance(left, Index):
1442-
assert isinstance(right, Index)
1442+
_check_isinstance(left, right, Index)
1443+
right = Index(right)
14431444
assert_index_equal(left, right, **kwargs)
14441445
elif isinstance(left, Series):
14451446
assert isinstance(right, Series)

0 commit comments

Comments
 (0)