From 6cfbe5a304899353524fc230ac320e9137b0b739 Mon Sep 17 00:00:00 2001 From: Lu Yibo <1478354316@qq.com> Date: Wed, 5 Nov 2025 19:16:04 +0800 Subject: [PATCH] Add strict mode to zip in divmod tests --- pandas/tests/arithmetic/test_numeric.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/tests/arithmetic/test_numeric.py b/pandas/tests/arithmetic/test_numeric.py index c6d48aac1a441..a6a117ac53806 100644 --- a/pandas/tests/arithmetic/test_numeric.py +++ b/pandas/tests/arithmetic/test_numeric.py @@ -766,7 +766,7 @@ def test_divmod_scalar(self, numeric_idx): div, mod = divmod(idx.values, 2) expected = Index(div), Index(mod) - for r, e in zip(result, expected): + for r, e in zip(result, expected, strict=True): tm.assert_index_equal(r, e) def test_divmod_ndarray(self, numeric_idx): @@ -778,7 +778,7 @@ def test_divmod_ndarray(self, numeric_idx): div, mod = divmod(idx.values, other) expected = Index(div), Index(mod) - for r, e in zip(result, expected): + for r, e in zip(result, expected, strict=True): tm.assert_index_equal(r, e) def test_divmod_series(self, numeric_idx): @@ -790,7 +790,7 @@ def test_divmod_series(self, numeric_idx): div, mod = divmod(idx.values, other) expected = Series(div), Series(mod) - for r, e in zip(result, expected): + for r, e in zip(result, expected, strict=True): tm.assert_series_equal(r, e) @pytest.mark.parametrize("other", [np.nan, 7, -23, 2.718, -3.14, np.inf]) @@ -1088,7 +1088,7 @@ def test_divmod(self, func): with np.errstate(all="ignore"): expecteds = divmod(series.values, np.asarray(other_np)) - for result, expected in zip(results, expecteds): + for result, expected in zip(results, expecteds, strict=True): # check the values, name, and index separately tm.assert_almost_equal(np.asarray(result), expected)