mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-112087: Make list_{slice, ass_slice, subscript} to be threadsafe (gh-116233)
This commit is contained in:
parent
58c7919d05
commit
6cddc731fb
2 changed files with 87 additions and 50 deletions
|
@ -96,6 +96,11 @@ class ListTest(list_tests.CommonTest):
|
|||
self.assertRaises((MemoryError, OverflowError), mul, lst, n)
|
||||
self.assertRaises((MemoryError, OverflowError), imul, lst, n)
|
||||
|
||||
def test_empty_slice(self):
|
||||
x = []
|
||||
x[:] = x
|
||||
self.assertEqual(x, [])
|
||||
|
||||
def test_list_resize_overflow(self):
|
||||
# gh-97616: test new_allocated * sizeof(PyObject*) overflow
|
||||
# check in list_resize()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue