mirror of https://github.com/python/cpython
Make catched exception more specific and correct a comment.
This commit is contained in:
commit
58f8833e4c
|
@ -1942,15 +1942,15 @@ class AbstractPickleTests(unittest.TestCase):
|
||||||
# 5th item is not an iterator
|
# 5th item is not an iterator
|
||||||
return dict, (), None, None, []
|
return dict, (), None, None, []
|
||||||
|
|
||||||
# Protocol 0 is less strict and also accept iterables.
|
# Python implementation is less strict and also accepts iterables.
|
||||||
for proto in protocols:
|
for proto in protocols:
|
||||||
try:
|
try:
|
||||||
self.dumps(C(), proto)
|
self.dumps(C(), proto)
|
||||||
except (pickle.PickleError):
|
except pickle.PicklingError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
self.dumps(D(), proto)
|
self.dumps(D(), proto)
|
||||||
except (pickle.PickleError):
|
except pickle.PicklingError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def test_many_puts_and_gets(self):
|
def test_many_puts_and_gets(self):
|
||||||
|
|
Loading…
Reference in New Issue