def test_db_deletion(self): os.remove(self.dbPath) self.assertFalse(os.path.exists(self.dbPath)) Base(".") self.assertTrue(os.path.exists(self.dbPath)) os.remove(self.dbPath) os.rmdir(".clsearch") self.assertFalse(os.path.exists(self.dbPath)) Base(".") self.assertTrue(os.path.exists(self.dbPath)) os.remove(self.dbPath) os.rmdir(".clsearch") self.assertFalse(os.path.exists(self.dbPath))
def test_db_creation(self): self.assertRaises(OSError, Base, "/usr") Base(".") self.assertTrue(os.path.exists(self.dbPath))
def setUp(self): self.b = Base() self.dbPath = ".clsearch/clsdb.sqlite"