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/tests/strings/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
("empty", []),
("mixed-integer", ["a", np.nan, 2]),
]
ids, _ = zip(*_any_allowed_skipna_inferred_dtype) # use inferred type as id
ids, _ = zip(
*_any_allowed_skipna_inferred_dtype, strict=True
) # use inferred type as id


@pytest.fixture(params=_any_allowed_skipna_inferred_dtype, ids=ids)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/strings/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def test_cat_on_bytes_raises():

def test_str_accessor_in_apply_func():
# https://github.com/pandas-dev/pandas/issues/38979
df = DataFrame(zip("abc", "def"))
df = DataFrame(zip("abc", "def", strict=True))
expected = Series(["A/D", "B/E", "C/F"])
result = df.apply(lambda f: "/".join(f.str.upper()), axis=1)
tm.assert_series_equal(result, expected)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ def test_duplicated_with_nas(self):

keys = np.empty(8, dtype=object)
for i, t in enumerate(
zip([0, 0, np.nan, np.nan] * 2, [0, np.nan, 0, np.nan] * 2)
zip([0, 0, np.nan, np.nan] * 2, [0, np.nan, 0, np.nan] * 2, strict=True)
):
keys[i] = t

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_decons(codes_list, shape):
group_index = get_group_index(codes_list, shape, sort=True, xnull=True)
codes_list2 = _decons_group_index(group_index, shape)

for a, b in zip(codes_list, codes_list2):
for a, b in zip(codes_list, codes_list2, strict=True):
tm.assert_numpy_array_equal(a, b)


Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/util/test_validate_kwargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_not_all_none(i, _fname):
kwarg_keys = ("foo", "bar", "baz")
kwarg_vals = (2, "s", None)

kwargs = dict(zip(kwarg_keys[:i], kwarg_vals[:i]))
kwargs = dict(zip(kwarg_keys[:i], kwarg_vals[:i], strict=True))

with pytest.raises(ValueError, match=msg):
validate_kwargs(_fname, kwargs, compat_args)
Expand Down
Loading