[Python-checkins] cpython (merge 3.3 -> default): Issue #18063: fix some struct specifications in the tests for sys.getsizeof().

antoine.pitrou python-checkins at python.org
Sat May 25 23:48:25 CEST 2013


http://hg.python.org/cpython/rev/5c4ca109af1c
changeset:   83932:5c4ca109af1c
parent:      83930:d9828c438889
parent:      83931:c20b701c66fc
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat May 25 23:48:15 2013 +0200
summary:
  Issue #18063: fix some struct specifications in the tests for sys.getsizeof().

files:
  Lib/test/test_sys.py |  10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -735,13 +735,13 @@
         class C(object): pass
         check(C.__dict__, size('P'))
         # BaseException
-        check(BaseException(), size('5Pi'))
+        check(BaseException(), size('5Pb'))
         # UnicodeEncodeError
-        check(UnicodeEncodeError("", "", 0, 0, ""), size('5Pi 2P2nP'))
+        check(UnicodeEncodeError("", "", 0, 0, ""), size('5Pb 2P2nP'))
         # UnicodeDecodeError
-        check(UnicodeDecodeError("", b"", 0, 0, ""), size('5Pi 2P2nP'))
+        check(UnicodeDecodeError("", b"", 0, 0, ""), size('5Pb 2P2nP'))
         # UnicodeTranslateError
-        check(UnicodeTranslateError("", 0, 1, ""), size('5Pi 2P2nP'))
+        check(UnicodeTranslateError("", 0, 1, ""), size('5Pb 2P2nP'))
         # ellipses
         check(Ellipsis, size(''))
         # EncodingMap
@@ -883,7 +883,7 @@
         samples = ['1'*100, '\xff'*50,
                    '\u0100'*40, '\uffff'*100,
                    '\U00010000'*30, '\U0010ffff'*100]
-        asciifields = "nniP"
+        asciifields = "nnbP"
         compactfields = asciifields + "nPn"
         unicodefields = compactfields + "P"
         for s in samples:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list