mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Issue 3049: Some 3k sizeof tests fail.
This commit is contained in:
parent
f086fdd3f5
commit
4efb518185
1 changed files with 10 additions and 13 deletions
|
@ -424,18 +424,15 @@ class SizeofTest(unittest.TestCase):
|
||||||
return x
|
return x
|
||||||
return inner
|
return inner
|
||||||
self.check_sizeof(get_cell().__closure__[0], h + p)
|
self.check_sizeof(get_cell().__closure__[0], h + p)
|
||||||
# code XXX wrong size
|
# code
|
||||||
# self.check_sizeof(get_cell().__code__, h + self.align(4*i) + 8*p +\
|
self.check_sizeof(get_cell().__code__, h + self.align(5*i) + 8*p +\
|
||||||
# self.align(i) + 2*p)
|
self.align(i) + 2*p)
|
||||||
# complex
|
# complex
|
||||||
self.check_sizeof(complex(0,1), h + 2*8)
|
self.check_sizeof(complex(0,1), h + 2*8)
|
||||||
# enumerate
|
# enumerate
|
||||||
self.check_sizeof(enumerate([]), h + l + 3*p)
|
self.check_sizeof(enumerate([]), h + l + 3*p)
|
||||||
# reverse
|
# reverse
|
||||||
self.check_sizeof(reversed(''), h + l + p )
|
self.check_sizeof(reversed(''), h + l + p )
|
||||||
# file XXX wrong size
|
|
||||||
#self.check_sizeof(self.file, h + 4*p + self.align(2*i) + 4*p +\
|
|
||||||
# self.align(3*i) + 3*p + self.align(i))
|
|
||||||
# float
|
# float
|
||||||
self.check_sizeof(float(0), h + 8)
|
self.check_sizeof(float(0), h + 8)
|
||||||
# function
|
# function
|
||||||
|
@ -469,13 +466,13 @@ class SizeofTest(unittest.TestCase):
|
||||||
class class_newstyle(object):
|
class class_newstyle(object):
|
||||||
def method():
|
def method():
|
||||||
pass
|
pass
|
||||||
# type (PyTypeObject + PyNumberMethods + PyMappingMethods +
|
# type (PyTypeObject + PyNumberMethods + PyMappingMethods +
|
||||||
# PySequenceMethods + PyBufferProcs)
|
# PySequenceMethods + PyBufferProcs)
|
||||||
# XXX wrong size
|
self.check_sizeof(class_newstyle, h +\
|
||||||
# len_typeobject = p + 2*l + 15*p + l + 4*p + l + 9*p + l + 11*p
|
p + 2*l + 15*p + l + 4*p + l + 9*p + l + 11*p +\
|
||||||
# self.check_sizeof(class_newstyle,
|
self.align(4) +\
|
||||||
# h + len_typeobject + 42*p + 10*p + 3*p + 6*p)
|
16*p + self.align(i) + 20*p +\
|
||||||
|
10*p + 3*p + 2*p + 2*p);
|
||||||
|
|
||||||
def test_specialtypes(self):
|
def test_specialtypes(self):
|
||||||
i = self.i
|
i = self.i
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue