aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
diff options
context:
space:
mode:
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 6f1cf336053..40498029693 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