From 4cf52a21e7a773e79312ac77657c78a032786717 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 25 Jan 2006 07:58:22 +0000 Subject: Remove file even if non-existant --- Lib/test/test_bsddb3.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py index 2d1bff7..34fbb82 100644 --- a/Lib/test/test_bsddb3.py +++ b/Lib/test/test_bsddb3.py @@ -2,9 +2,10 @@ """ Run all test cases. """ +import os import sys import unittest -from test.test_support import requires, verbose, run_suite, unlink +from test.test_support import requires, verbose, run_suite # When running as a script instead of within the regrtest framework, skip the # requires test, since it's obvious we want to run them. @@ -27,7 +28,10 @@ def suite(): import bsddb.test.test_1413192 except: for f in ['__db.001', '__db.002', '__db.003', 'log.0000000001']: - unlink(f) + try: + os.unlink(f) + except OSError: + pass test_modules = [ 'test_associate', -- cgit v0.12