]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove the temp file when we're done.
authorGuido van Rossum <guido@python.org>
Wed, 24 Mar 1999 19:03:01 +0000 (19:03 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 24 Mar 1999 19:03:01 +0000 (19:03 +0000)
Lib/test/test_bsddb.py

index 1188e0612759bc9e4bcf99da8b3fbd188cd3c3a2..e5780ea80433b5a9fcbd99d6c0ca4d87e1bdf7c1 100755 (executable)
@@ -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 @@ types = [(bsddb.btopen, 'BTree'),
 
 for type in types:
     test(type[0], type[1])
-