[Python-checkins] cpython (3.2): Try to fix one of the bigmem tests in test_pickle

antoine.pitrou python-checkins at python.org
Tue Aug 30 23:42:32 CEST 2011


http://hg.python.org/cpython/rev/942729c61684
changeset:   72143:942729c61684
branch:      3.2
parent:      72140:5e23532f694d
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Aug 30 23:39:34 2011 +0200
summary:
  Try to fix one of the bigmem tests in test_pickle

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


diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1199,11 +1199,16 @@
         finally:
             data = None
 
+    # BINUNICODE (protocols 1, 2 and 3) cannot carry more than
+    # 2**32 - 1 bytes of utf-8 encoded unicode.
+
     @precisionbigmemtest(size=_4G, memuse=1 + character_size, dry_run=False)
     def test_huge_str_64b(self, size):
         data = "a" * size
         try:
             for proto in protocols:
+                if proto == 0:
+                    continue
                 with self.assertRaises((ValueError, OverflowError)):
                     self.dumps(data, protocol=proto)
         finally:

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


More information about the Python-checkins mailing list