Skip to content

Commit 585c89e

Browse files
authored
Add strict mode to zip in divmod tests in pandas\tests\arithmetic\test_numeric (#62996)
1 parent 842a2c6 commit 585c89e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/arithmetic/test_numeric.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def test_divmod_scalar(self, numeric_idx):
766766
div, mod = divmod(idx.values, 2)
767767

768768
expected = Index(div), Index(mod)
769-
for r, e in zip(result, expected):
769+
for r, e in zip(result, expected, strict=True):
770770
tm.assert_index_equal(r, e)
771771

772772
def test_divmod_ndarray(self, numeric_idx):
@@ -778,7 +778,7 @@ def test_divmod_ndarray(self, numeric_idx):
778778
div, mod = divmod(idx.values, other)
779779

780780
expected = Index(div), Index(mod)
781-
for r, e in zip(result, expected):
781+
for r, e in zip(result, expected, strict=True):
782782
tm.assert_index_equal(r, e)
783783

784784
def test_divmod_series(self, numeric_idx):
@@ -790,7 +790,7 @@ def test_divmod_series(self, numeric_idx):
790790
div, mod = divmod(idx.values, other)
791791

792792
expected = Series(div), Series(mod)
793-
for r, e in zip(result, expected):
793+
for r, e in zip(result, expected, strict=True):
794794
tm.assert_series_equal(r, e)
795795

796796
@pytest.mark.parametrize("other", [np.nan, 7, -23, 2.718, -3.14, np.inf])
@@ -1088,7 +1088,7 @@ def test_divmod(self, func):
10881088
with np.errstate(all="ignore"):
10891089
expecteds = divmod(series.values, np.asarray(other_np))
10901090

1091-
for result, expected in zip(results, expecteds):
1091+
for result, expected in zip(results, expecteds, strict=True):
10921092
# check the values, name, and index separately
10931093
tm.assert_almost_equal(np.asarray(result), expected)
10941094

0 commit comments

Comments
 (0)