Skip to content

Commit 03a5289

Browse files
authored
Add strict=true in zip() in tests\arrays (#62997)
1 parent 585c89e commit 03a5289

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pandas/tests/arrays/categorical/test_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_map_with_dict_or_series(na_action):
130130
expected = Categorical(new_values, categories=[3.0, 2, "one"])
131131
tm.assert_categorical_equal(result, expected)
132132

133-
mapper = dict(zip(orig_values[:-1], new_values[:-1]))
133+
mapper = dict(zip(orig_values[:-1], new_values[:-1], strict=True))
134134
result = cat.map(mapper, na_action=na_action)
135135
# Order of categories in result can be different
136136
tm.assert_categorical_equal(result, expected)

pandas/tests/arrays/integer/test_construction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_conversions(data_missing):
6767
expected = np.array([pd.NA, 1], dtype=object)
6868
tm.assert_numpy_array_equal(result, expected)
6969

70-
for r, e in zip(result, expected):
70+
for r, e in zip(result, expected, strict=True):
7171
if pd.isnull(r):
7272
assert pd.isnull(e)
7373
elif is_integer(r):

pandas/tests/arrays/integer/test_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_ufunc_binary_output(using_nan_is_na):
104104
assert isinstance(result, tuple)
105105
assert len(result) == 2
106106

107-
for x, y in zip(result, expected):
107+
for x, y in zip(result, expected, strict=True):
108108
tm.assert_extension_array_equal(x, y)
109109

110110

0 commit comments

Comments
 (0)