From 50674497086bc38d8ee4b039e935bbd295caa3a8 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Mon, 27 Feb 2023 22:15:50 -0900 Subject: [PATCH] Add DROP DATABASE at start of MySQL setup Closes #50 --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index 5a8a48f..8e9e28b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -158,6 +158,7 @@ def setup_mysql(): kwargs["port"] = int(bits.port) db = MySQLdb.connect(**kwargs) cursor = db.cursor() + cursor.execute("DROP DATABASE {};".format(bits.database)) cursor.execute("CREATE DATABASE IF NOT EXISTS {};".format(bits.database)) cursor.execute("USE {};".format(bits.database)) cursor.execute(MYSQL_SQL)