]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97616: test_list_resize_overflow() uses sys.maxsize (#99057)
authorVictor Stinner <vstinner@python.org>
Thu, 3 Nov 2022 14:56:12 +0000 (15:56 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Nov 2022 14:56:12 +0000 (15:56 +0100)
Lib/test/test_list.py

index 9aa6dd1095668b7abaedfe853062c8265434ebe6..2969c6e2f98a23fabf68e972510df4c61869a515 100644 (file)
@@ -103,7 +103,7 @@ class ListTest(list_tests.CommonTest):
         del lst[1:]
         self.assertEqual(len(lst), 1)
 
-        size = ((2 ** (tuple.__itemsize__ * 8) - 1) // 2)
+        size = sys.maxsize
         with self.assertRaises((MemoryError, OverflowError)):
             lst * size
         with self.assertRaises((MemoryError, OverflowError)):