def SaveWordDB(self, filename=WORDS_FILE): """ Saves the database file """ cf.saveDB(self.words_tree, filename) print('{0} saved with {1} trees'.format(filename, len(self.words_tree.getroot())))
def testSaveDB(self): """ Test saving the db """ db = self.getDB() tmp_file = "tmp.xml" cf.saveDB(db, tmp_file) os.remove(tmp_file)