summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/pickletester.py5
-rw-r--r--Lib/test/support.py3
2 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index f4b50aa..d79aab7 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1228,11 +1228,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:
diff --git a/Lib/test/support.py b/Lib/test/support.py
index d00a513..03af378 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -212,8 +212,7 @@ def rmtree(path):
try:
shutil.rmtree(path)
except OSError as error:
- # Unix returns ENOENT, Windows returns ESRCH.
- if error.errno not in (errno.ENOENT, errno.ESRCH):
+ if error.errno != errno.ENOENT:
raise
def make_legacy_pyc(source):