summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-30 18:59:32 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-30 18:59:32 (GMT)
commitff41d456bcbb3a6122513b4c414bbb32ac0a1223 (patch)
treef06a75d31760271d19d4e621cb3ce58471dfa86d
parentb8e54dd806e75f3591d8b7f07676a5738dad019d (diff)
downloadcpython-ff41d456bcbb3a6122513b4c414bbb32ac0a1223.zip
cpython-ff41d456bcbb3a6122513b4c414bbb32ac0a1223.tar.gz
cpython-ff41d456bcbb3a6122513b4c414bbb32ac0a1223.tar.bz2
Make catched exceptions more specific and correct a comment.
-rw-r--r--Lib/test/pickletester.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 78e5943..635c5af 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -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):