[Python-3000-checkins] r64340 - in python/branches/py3k: Lib/test/test_sys.py
benjamin.peterson
python-3000-checkins at python.org
Tue Jun 17 14:44:04 CEST 2008
Author: benjamin.peterson
Date: Tue Jun 17 14:44:04 2008
New Revision: 64340
Log:
Merged revisions 64326 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64326 | robert.schuppenies | 2008-06-17 03:42:15 -0500 (Tue, 17 Jun 2008) | 2 lines
Issue 3048: Fixed sys.sizeof test fails with wide unicode.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_sys.py
Modified: python/branches/py3k/Lib/test/test_sys.py
==============================================================================
--- python/branches/py3k/Lib/test/test_sys.py (original)
+++ python/branches/py3k/Lib/test/test_sys.py Tue Jun 17 14:44:04 2008
@@ -495,8 +495,7 @@
self.check_sizeof([], h + l + p + l)
self.check_sizeof([1, 2, 3], h + l + p + l + 3*l)
# unicode
- import math
- usize = math.log(sys.maxunicode + 1, 2) / 8
+ usize = len('\0'.encode('unicode-internal'))
samples = ['', '1'*100]
# we need to test for both sizes, because we don't know if the string
# has been cached
More information about the Python-3000-checkins
mailing list