Kaydet (Commit) ce527883 authored tarafından Neal Norwitz's avatar Neal Norwitz

Catch OSError when trying to remove a file in case removal fails. This

should prevent a failure in tearDown masking any real test failure.
üst 21807259
......@@ -32,7 +32,7 @@ class TransactionTests(unittest.TestCase):
def setUp(self):
try:
os.remove(get_db_path())
except:
except OSError:
pass
self.con1 = sqlite.connect(get_db_path(), timeout=0.1)
......@@ -48,7 +48,10 @@ class TransactionTests(unittest.TestCase):
self.cur2.close()
self.con2.close()
try:
os.unlink(get_db_path())
except OSError:
pass
def CheckDMLdoesAutoCommitBefore(self):
self.cur1.execute("create table test(i)")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment