From ba508a21e028811d9da8344fea574f3d0c88657a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 13 Jul 1999 15:23:42 +0000 Subject: Add test case for bug just fixed by Stephen Turner. --- Lib/test/test_cpickle.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Lib/test/test_cpickle.py b/Lib/test/test_cpickle.py index 9088eb7..7cc4b1f 100644 --- a/Lib/test/test_cpickle.py +++ b/Lib/test/test_cpickle.py @@ -93,4 +93,15 @@ def dotest(): print "load from closed file should raise IOError" os.remove(fn) + # Test specific bad cases + for i in range(10): + try: + x = cPickle.loads('garyp') + except cPickle.BadPickleGet, y: + del y + else: + print "unexpected success!" + break + + dotest() -- cgit v0.12