Commit 6285ffd9 authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Correct the pickle test, broken since r67059:

the python version of pickle is still more tolerant than the C one.
parent f216c942
......@@ -888,9 +888,16 @@ class AbstractPickleTests(unittest.TestCase):
# 5th item is not an iterator
return dict, (), None, None, []
# Protocol 0 is less strict and also accept iterables.
for proto in protocols:
self.assertRaises(pickle.PickleError, self.dumps, C(), proto)
self.assertRaises(pickle.PickleError, self.dumps, D(), proto)
try:
self.dumps(C(), proto)
except (pickle.PickleError):
pass
try:
self.dumps(D(), proto)
except (pickle.PickleError):
pass
# Test classes for reduce_ex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment