Issue #25761: Added more test cases for testing unpickling broken data.
Output raised exception at verbose level 2 (-vv).
diff --git a/Lib/test/test_cpickle.py b/Lib/test/test_cpickle.py
index fff2b80..c9ec788 100644
--- a/Lib/test/test_cpickle.py
+++ b/Lib/test/test_cpickle.py
@@ -52,6 +52,9 @@
error = cPickle.BadPickleGet
module = cPickle
bad_stack_errors = (cPickle.UnpicklingError,)
+ bad_mark_errors = (EOFError,)
+ truncated_errors = (cPickle.UnpicklingError, EOFError,
+ AttributeError, ValueError)
class cPickleUnpicklerTests(AbstractUnpickleTests):
@@ -65,6 +68,9 @@
error = cPickle.BadPickleGet
bad_stack_errors = (cPickle.UnpicklingError,)
+ bad_mark_errors = (EOFError,)
+ truncated_errors = (cPickle.UnpicklingError, EOFError,
+ AttributeError, ValueError)
class cStringIOCUnpicklerTests(cStringIOMixin, cPickleUnpicklerTests):
pass