Skip to content

Commit a4dab68

Browse files
committed
Simplify the test
1 parent deccbf0 commit a4dab68

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

Lib/test/test_array.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,23 +1684,9 @@ def test_gh_128961(self):
16841684
# Tests for NULL pointer dereference in array.__setitem__
16851685
# when the index conversion mutates the array.
16861686
# See: gh-142555.
1687-
@subTests(
1688-
("dtype", "items"),
1689-
[
1690-
("b", list(range(64))),
1691-
("B", list(range(64))),
1692-
("h", list(range(64))),
1693-
("H", list(range(64))),
1694-
("i", list(range(64))),
1695-
("l", list(range(64))),
1696-
("q", list(range(64))),
1697-
("I", list(range(64))),
1698-
("L", list(range(64))),
1699-
("Q", list(range(64))),
1700-
],
1701-
)
1702-
def test_setitem_use_after_clear_with_int_data(self, dtype, items):
1703-
victim = array.array(dtype, items)
1687+
@subTests("dtype", ["b", "B", "h", "H", "i", "l", "q", "I", "L", "Q"])
1688+
def test_setitem_use_after_clear_with_int_data(self, dtype):
1689+
victim = array.array(dtype, list(range(64)))
17041690

17051691
class Index:
17061692
def __index__(self):

0 commit comments

Comments
 (0)