Kaydet (Commit) a710d6e2 authored tarafından Fred Drake's avatar Fred Drake

Added test case for accessing gsbm database by key after it's closed;

it should raise gdbm.error.
üst ef6ceb62
......@@ -5,7 +5,7 @@
import gdbm
from gdbm import error
from test_support import verbose
from test_support import verbose, TestFailed
filename= '/tmp/delete_me'
......@@ -18,6 +18,12 @@ if verbose:
g.has_key('a')
g.close()
try:
g['a']
except error:
pass
else:
raise TestFailed, "expected gdbm.error accessing closed database"
g = gdbm.open(filename, 'r')
g.close()
g = gdbm.open(filename, 'rw')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment