mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Remove the temp file when we're done.
This commit is contained in:
parent
d023a78f59
commit
4ec2698725
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
||||||
"""Test script for the bsddb C module
|
"""Test script for the bsddb C module
|
||||||
Roger E. Masse
|
Roger E. Masse
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import bsddb
|
import bsddb
|
||||||
import tempfile
|
import tempfile
|
||||||
from test_support import verbose
|
from test_support import verbose
|
||||||
|
@ -56,6 +58,10 @@ def test(openmethod, what):
|
||||||
print word
|
print word
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
|
try:
|
||||||
|
os.remove(fname)
|
||||||
|
except os.error:
|
||||||
|
pass
|
||||||
|
|
||||||
types = [(bsddb.btopen, 'BTree'),
|
types = [(bsddb.btopen, 'BTree'),
|
||||||
(bsddb.hashopen, 'Hash Table'),
|
(bsddb.hashopen, 'Hash Table'),
|
||||||
|
@ -66,4 +72,3 @@ types = [(bsddb.btopen, 'BTree'),
|
||||||
|
|
||||||
for type in types:
|
for type in types:
|
||||||
test(type[0], type[1])
|
test(type[0], type[1])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue