mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Fixed: sys.getsizeof does not take the actual length of the tuples into account.
This commit is contained in:
parent
60c0be3acd
commit
73e9ffc811
2 changed files with 15 additions and 0 deletions
|
@ -567,6 +567,9 @@ class SizeofTest(unittest.TestCase):
|
|||
# string
|
||||
self.check_sizeof('', h + l + self.align(i + 1))
|
||||
self.check_sizeof('abc', h + l + self.align(i + 1) + 3)
|
||||
# tuple
|
||||
self.check_sizeof((), h)
|
||||
self.check_sizeof((1,2,3), h + 3*p)
|
||||
|
||||
|
||||
def test_main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue