diff options
author | Robert Schuppenies <okkotonushi@googlemail.com> | 2008-07-14 08:42:18 (GMT) |
---|---|---|
committer | Robert Schuppenies <okkotonushi@googlemail.com> | 2008-07-14 08:42:18 (GMT) |
commit | 2ee623b7109cbbc22aaea9eb934f8aa993355a89 (patch) | |
tree | c83e649ba76fe23bdf378d501ab6f18927a4c23c /Lib/test/test_sys.py | |
parent | fb7a50fbb9d4728909382ba7f9eb65f2c0ab2d79 (diff) | |
download | cpython-2ee623b7109cbbc22aaea9eb934f8aa993355a89.zip cpython-2ee623b7109cbbc22aaea9eb934f8aa993355a89.tar.gz cpython-2ee623b7109cbbc22aaea9eb934f8aa993355a89.tar.bz2 |
Fixed test failure on Win64 machines.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 12ba113..35467e4 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -511,9 +511,9 @@ class SizeofTest(unittest.TestCase): # method-wrapper (descriptor object) check({}.__iter__, size(h + '2P')) # dict - check({}, size(h + '3P2P') + 8*size('P2P')) + check({}, size(h + '3P2P' + 8*'P2P')) x = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} - check(x, size(h + '3P2P') + (8+16)*size('P2P')) + check(x, size(h + '3P2P' + 8*'P2P') + 16*size('P2P')) # dictionary-keyiterator check({}.iterkeys(), size(h + 'P2PPP')) # dictionary-valueiterator @@ -542,9 +542,7 @@ class SizeofTest(unittest.TestCase): nfrees = len(x.f_code.co_freevars) extras = x.f_code.co_stacksize + x.f_code.co_nlocals +\ ncells + nfrees - 1 - check(x, size(vh + '12P3i') +\ - CO_MAXBLOCKS*struct.calcsize('3i') +\ - self.P + extras*self.P) + check(x, size(vh + '12P3i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) # function def func(): pass check(func, size(h + '9P')) @@ -612,8 +610,7 @@ class SizeofTest(unittest.TestCase): # frozenset PySet_MINSIZE = 8 samples = [[], range(10), range(50)] - s = size(h + '3P2P') +\ - PySet_MINSIZE*struct.calcsize('lP') + self.l + self.P + s = size(h + '3P2P' + PySet_MINSIZE*'lP' + 'lP') for sample in samples: minused = len(sample) if minused == 0: tmp = 1 @@ -646,7 +643,7 @@ class SizeofTest(unittest.TestCase): # type # (PyTypeObject + PyNumberMethods + PyMappingMethods + # PySequenceMethods + PyBufferProcs) - s = size('P2P15Pl4PP9PP11PI') + size(vh + '41P 10P 3P 6P') + s = size(vh + 'P2P15Pl4PP9PP11PI') + size('41P 10P 3P 6P') class newstyleclass(object): pass check(newstyleclass, s) |