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 # double free happened during exit from DBC_get
finally: finally:
db1.close() db1.close()
os.unlink(self.filename) test_support.unlink(self.filename)
def test06_key_with_null_bytes(self): def test06_key_with_null_bytes(self):
try: try:
@ -96,7 +96,7 @@ class MiscTestCase(unittest.TestCase):
self.assertEqual(db1['aaa'], 'eh eh eh!') self.assertEqual(db1['aaa'], 'eh eh eh!')
finally: finally:
db1.close() db1.close()
os.unlink(self.filename) test_support.unlink(self.filename)
def test07_DB_set_flags_persists(self): def test07_DB_set_flags_persists(self):
if db.version() < (4,2): if db.version() < (4,2):
@ -124,7 +124,7 @@ class MiscTestCase(unittest.TestCase):
self.assertEqual([('a', 'new A')], db1.items()) self.assertEqual([('a', 'new A')], db1.items())
finally: finally:
db1.close() 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 timeout = time.time()+2
while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) : while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) :
time.sleep(0.02) 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() d = self.dbenvMaster.repmgr_site_list()
self.assertEquals(len(d), 1) self.assertEquals(len(d), 1)