projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef6ceb6
)
Added test case for accessing gsbm database by key after it's closed;
author
Fred Drake
<fdrake@acm.org>
Mon, 7 Feb 2000 17:15:48 +0000
(17:15 +0000)
committer
Fred Drake
<fdrake@acm.org>
Mon, 7 Feb 2000 17:15:48 +0000
(17:15 +0000)
it should raise gdbm.error.
Lib/test/test_gdbm.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_gdbm.py
b/Lib/test/test_gdbm.py
index 22db6aaa9ef114bacae4816fefbb88416ef7cddd..030218e609136ead153c8c03deb28c406eed26b6 100755
(executable)
--- a/
Lib/test/test_gdbm.py
+++ b/
Lib/test/test_gdbm.py
@@
-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')