Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/_testing/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class for all warnings. To raise multiple types of exceptions,
if isinstance(match, tuple)
else (match,) * len(expected_warning)
)
for warning_type, warning_match in zip(expected_warning, match):
for warning_type, warning_match in zip(
expected_warning, match, strict=True
):
_assert_caught_expected_warnings(
caught_warnings=w,
expected_warning=warning_type,
Expand Down
4 changes: 2 additions & 2 deletions pandas/_testing/asserters.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def _raise(left, right, err_msg) -> NoReturn:
)

diff = 0
for left_arr, right_arr in zip(left, right):
for left_arr, right_arr in zip(left, right, strict=True):
# count up differences
if not array_equivalent(left_arr, right_arr, strict_nan=strict_nan):
diff += 1
Expand Down Expand Up @@ -1447,7 +1447,7 @@ def assert_copy(iter1, iter2, **eql_kwargs) -> None:
the same object. (Does not check that items
in sequences are also not the same object)
"""
for elem1, elem2 in zip(iter1, iter2):
for elem1, elem2 in zip(iter1, iter2, strict=True):
assert_almost_equal(elem1, elem2, **eql_kwargs)
msg = (
f"Expected object {type(elem1)!r} and object {type(elem2)!r} to be "
Expand Down
Loading