]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Try to fix one of the bigmem tests in test_pickle
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 30 Aug 2011 21:39:34 +0000 (23:39 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 30 Aug 2011 21:39:34 +0000 (23:39 +0200)
Lib/test/pickletester.py

index 6dc2b5b3002207f5e18a6cdf1507d84c2b403504..c2ed0d284991aeb529ea2c647d544d9ff8d50e0e 100644 (file)
@@ -1199,11 +1199,16 @@ class BigmemPickleTests(unittest.TestCase):
         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: