diff --git a/pandas/tests/apply/test_series_apply.py b/pandas/tests/apply/test_series_apply.py index 5669a73f521e6..d0ad7a53b3f4c 100644 --- a/pandas/tests/apply/test_series_apply.py +++ b/pandas/tests/apply/test_series_apply.py @@ -545,7 +545,9 @@ def test_apply_to_timedelta(by_row): ) def test_apply_listlike_reducer(string_series, ops, names, how, kwargs): # GH 39140 - expected = Series({name: op(string_series) for name, op in zip(names, ops)}) + expected = Series( + {name: op(string_series) for name, op in zip(names, ops, strict=True)} + ) expected.name = "series" result = getattr(string_series, how)(ops, **kwargs) tm.assert_series_equal(result, expected) diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index 43a130c52a1c6..b8a5fbace2895 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -1197,7 +1197,7 @@ def test_attr_expression(self): expec3 = df.a + df.b + df.c[df.b < 0] exprs = expr1, expr2, expr3 expecs = expec1, expec2, expec3 - for e, expec in zip(exprs, expecs): + for e, expec in zip(exprs, expecs, strict=True): tm.assert_series_equal(expec, self.eval(e, local_dict={"df": df})) def test_assignment_fails(self):