From: Guido van Rossum Date: Tue, 13 Jul 1999 15:23:42 +0000 (+0000) Subject: Add test case for bug just fixed by Stephen Turner. X-Git-Tag: v1.6a1~1076 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba508a21e028811d9da8344fea574f3d0c88657a;p=thirdparty%2FPython%2Fcpython.git Add test case for bug just fixed by Stephen Turner. --- diff --git a/Lib/test/test_cpickle.py b/Lib/test/test_cpickle.py index 9088eb7602ec..7cc4b1fccca7 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()