def connection(): create_db('_test_db') connection = db_connection('_test_db') setup_db(connection) yield connection teardown_db(connection) connection.close()
def connection(): create_db(TEST_DB_NAME) connection = db_connection(TEST_DB_NAME) setup_db(connection) yield connection teardown_db(connection) connection.close()
def main(): dbutils.create_db("database.db") name = input("Enter the name to add to the database: ") phone = input( "Enter the phone number (without dashes) to add to the database: ") dbutils.insert("database.db", name, phone)
def main(): # Create Database if it doesn't exist if not os.path.exists(dbFile): dbutils.create_db(dbFile) # Show the main GUI doMenu()