Commit ff41d456 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Make catched exceptions more specific and correct a comment.

parent b8e54dd8
......@@ -1373,15 +1373,16 @@ class AbstractPickleTests(unittest.TestCase):
# 5th item is not an iterator
return dict, (), None, None, []
# Protocol 0 is less strict and also accept iterables.
# Protocol 0 in Python implementation is less strict and also accepts
# iterables.
for proto in protocols:
try:
self.dumps(C(), proto)
except (AttributeError, pickle.PickleError, cPickle.PickleError):
except (AttributeError, pickle.PicklingError, cPickle.PicklingError):
pass
try:
self.dumps(D(), proto)
except (AttributeError, pickle.PickleError, cPickle.PickleError):
except (AttributeError, pickle.PicklingError, cPickle.PicklingError):
pass
def test_many_puts_and_gets(self):
......
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