summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 174f4ff..a2b49e6 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1982,8 +1982,10 @@ class AbstractPicklingErrorTests:
pb = pickle.PickleBuffer(b"foobar")
for proto in range(0, 5):
with self.subTest(proto=proto):
- with self.assertRaises(pickle.PickleError):
+ with self.assertRaises(pickle.PickleError) as cm:
self.dumps(pb, proto)
+ self.assertEqual(str(cm.exception),
+ 'PickleBuffer can only be pickled with protocol >= 5')
def test_non_continuous_buffer(self):
if self.pickler is pickle._Pickler: