summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-06-17 12:44:04 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-06-17 12:44:04 (GMT)
commitb49d994d007c43853b265d6626c7cf346deb46fb (patch)
tree80c52f5682d9d7148c4d8411cf69ae6794f33bd1 /Lib/test
parentbb37ca89673a4b0c2bc6b10bdc7aad95204f0703 (diff)
downloadcpython-b49d994d007c43853b265d6626c7cf346deb46fb.zip
cpython-b49d994d007c43853b265d6626c7cf346deb46fb.tar.gz
cpython-b49d994d007c43853b265d6626c7cf346deb46fb.tar.bz2
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. ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sys.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 6f1cf33..4049802 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -495,8 +495,7 @@ class SizeofTest(unittest.TestCase):
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