diff options
author | Robert Schuppenies <okkotonushi@googlemail.com> | 2008-06-17 08:42:15 (GMT) |
---|---|---|
committer | Robert Schuppenies <okkotonushi@googlemail.com> | 2008-06-17 08:42:15 (GMT) |
commit | 59f3ade862dc885ddc4499227256079625d690a2 (patch) | |
tree | 82c25a07dee62c566393936264f2ae8ab359ebde /Lib/test | |
parent | d0ba07327a94dfae6ba0f869d9ae3bd19d425ba8 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/test/test_sys.py | 3 |
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 |