]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- not sure why MySQL DROP DBs fail but we can't just ignore the error
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Mar 2016 15:50:18 +0000 (10:50 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 Mar 2016 15:50:18 +0000 (10:50 -0500)
like this

lib/sqlalchemy/testing/provision.py

index 3d8096ce710522c2941a6b7cdc061babc37bbe02..b3812cf0488dc2fd4f479caef654a34247f8bcee 100644 (file)
@@ -223,18 +223,9 @@ def _sqlite_drop_db(cfg, eng, ident):
 @_drop_db.for_db("mysql")
 def _mysql_drop_db(cfg, eng, ident):
     with eng.connect() as conn:
-        try:
-            conn.execute("DROP DATABASE %s_test_schema" % ident)
-        except Exception:
-            pass
-        try:
-            conn.execute("DROP DATABASE %s_test_schema_2" % ident)
-        except Exception:
-            pass
-        try:
-            conn.execute("DROP DATABASE %s" % ident)
-        except Exception:
-            pass
+        conn.execute("DROP DATABASE %s_test_schema" % ident)
+        conn.execute("DROP DATABASE %s_test_schema_2" % ident)
+        conn.execute("DROP DATABASE %s" % ident)
 
 
 @_create_db.for_db("oracle")