Fixed: sys.getsizeof does not take the actual length of the tuples into account.

This commit is contained in:
Robert Schuppenies 2008-06-13 13:29:37 +00:00
parent 60c0be3acd
commit 73e9ffc811
2 changed files with 15 additions and 0 deletions

View file

@ -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():