summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorRobert Schuppenies <okkotonushi@googlemail.com>2008-06-17 08:42:15 (GMT)
committerRobert Schuppenies <okkotonushi@googlemail.com>2008-06-17 08:42:15 (GMT)
commit59f3ade862dc885ddc4499227256079625d690a2 (patch)
tree82c25a07dee62c566393936264f2ae8ab359ebde /Lib/test/test_sys.py
parentd0ba07327a94dfae6ba0f869d9ae3bd19d425ba8 (diff)
downloadcpython-59f3ade862dc885ddc4499227256079625d690a2.zip
cpython-59f3ade862dc885ddc4499227256079625d690a2.tar.gz
cpython-59f3ade862dc885ddc4499227256079625d690a2.tar.bz2
Issue 3048: Fixed sys.sizeof test fails with wide unicode.
Diffstat (limited to 'Lib/test/test_sys.py')
-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 2062838..f1fb615 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -538,8 +538,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(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