mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Add a spacing saving heuristic to deque's extend methods
This commit is contained in:
parent
bbf8ce5b87
commit
d9c116ca40
2 changed files with 18 additions and 2 deletions
|
@ -543,8 +543,8 @@ class TestBasic(unittest.TestCase):
|
|||
check = self.check_sizeof
|
||||
check(deque(), basesize + blocksize)
|
||||
check(deque('a'), basesize + blocksize)
|
||||
check(deque('a' * (BLOCKLEN // 2)), basesize + blocksize)
|
||||
check(deque('a' * (BLOCKLEN // 2 + 1)), basesize + 2 * blocksize)
|
||||
check(deque('a' * (BLOCKLEN - 1)), basesize + blocksize)
|
||||
check(deque('a' * BLOCKLEN), basesize + 2 * blocksize)
|
||||
check(deque('a' * (42 * BLOCKLEN)), basesize + 43 * blocksize)
|
||||
|
||||
class TestVariousIteratorArgs(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue