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