Skip to content

Commit b8a9f13

Browse files
authored
gh-97616: test_list_resize_overflow() uses sys.maxsize (#99057)
1 parent 1208037 commit b8a9f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_list_resize_overflow(self):
103103
del lst[1:]
104104
self.assertEqual(len(lst), 1)
105105

106-
size = ((2 ** (tuple.__itemsize__ * 8) - 1) // 2)
106+
size = sys.maxsize
107107
with self.assertRaises((MemoryError, OverflowError)):
108108
lst * size
109109
with self.assertRaises((MemoryError, OverflowError)):

0 commit comments

Comments
 (0)