Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lib/test/test_capi/test_list.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import unittest
from test.support import import_helper
from collections import UserList
Expand Down Expand Up @@ -58,6 +59,9 @@ def test_list_new(self):
self.assertIsNot(lst2, lst)
self.assertRaises(SystemError, list_new, NULL)
self.assertRaises(SystemError, list_new, -1)
max_nitem = sys.maxsize // _testcapi.SIZEOF_VOID_P
self.assertRaises(MemoryError, list_new, max_nitem + 1)
self.assertRaises(MemoryError, list_new, sys.maxsize)

def test_list_size(self):
# Test PyList_Size()
Expand Down
Loading