Add test case for bug just fixed by Stephen Turner.

This commit is contained in:
Guido van Rossum 1999-07-13 15:23:42 +00:00
parent 2f80d96c04
commit ba508a21e0
1 changed files with 11 additions and 0 deletions

View File

@ -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()