def loadTypesXML(self): self.clearModMenu() fname = windows.openFile("xml") if fname != "": if windows.askOverwrite(): windows.writeTypesToDatabase(fname) self.fillModMenu()
def createTest(self): if self.v.get() == "create": self.passParams() self.createDatabase() windows.connectionSuccess(self.window) if self.typesDir.get() != "": windows.writeTypesToDatabase(self.typesDir.get()) else: self.testDB()
def creating_subTypesTest(dirToTypes, database): try: createDB(database) dao.setColumnNames() print(dao.getCoulumNames()) print("columns:", dao.columns) windows.writeTypesToDatabase(dirToTypes) finally: dao.drop_selected_DB(database)
def testDaoGetItems(database, dirToTypes): try: createDB(database) sleep(0.05) windows.writeTypesToDatabase(dirToTypes) cursor = connection(database).cursor() cursor.execute("SELECT name from items") sleep(0.05) print(cursor.fetchall()) finally: pass