[Python-checkins] r64326 - python/trunk/Lib/test/test_sys.py

robert.schuppenies python-checkins at python.org
Tue Jun 17 10:42:15 CEST 2008


Author: robert.schuppenies
Date: Tue Jun 17 10:42:15 2008
New Revision: 64326
Log:
Issue 3048: Fixed sys.sizeof test fails with wide unicode.
Modified:
 python/trunk/Lib/test/test_sys.py
Modified: python/trunk/Lib/test/test_sys.py
==============================================================================
--- python/trunk/Lib/test/test_sys.py	(original)
+++ python/trunk/Lib/test/test_sys.py	Tue Jun 17 10:42:15 2008
@@ -538,8 +538,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(u'0円'.encode('unicode-internal'))
 samples = [u'', u'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-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /