diff options
Diffstat (limited to 'Lib/test/test_cpickle.py')
-rw-r--r-- | Lib/test/test_cpickle.py | 11 |
1 files changed, 11 insertions, 0 deletions
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() |