Refinements in the bsddb testsuite

This commit is contained in:
Jesus Cea 2008-07-29 13:38:50 +00:00
parent 01a24322ec
commit a99363f472
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ class MiscTestCase(unittest.TestCase):
# double free happened during exit from DBC_get
finally:
db1.close()
os.unlink(self.filename)
test_support.unlink(self.filename)
def test06_key_with_null_bytes(self):
try:
@ -96,7 +96,7 @@ class MiscTestCase(unittest.TestCase):
self.assertEqual(db1['aaa'], 'eh eh eh!')
finally:
db1.close()
os.unlink(self.filename)
test_support.unlink(self.filename)
def test07_DB_set_flags_persists(self):
if db.version() < (4,2):
@ -124,7 +124,7 @@ class MiscTestCase(unittest.TestCase):
self.assertEqual([('a', 'new A')], db1.items())
finally:
db1.close()
os.unlink(self.filename)
test_support.unlink(self.filename)
#----------------------------------------------------------------------

View File

@ -131,7 +131,7 @@ class DBReplicationManager(unittest.TestCase):
timeout = time.time()+2
while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) :
time.sleep(0.02)
self.assertTrue(time.time()<timeout)
self.assertTrue(time.time()<timeout, msg = "Timeout Error: "+str(time.time()-timeout))
d = self.dbenvMaster.repmgr_site_list()
self.assertEquals(len(d), 1)