From: Mike Bayer Date: Thu, 3 Mar 2016 15:50:18 +0000 (-0500) Subject: - not sure why MySQL DROP DBs fail but we can't just ignore the error X-Git-Tag: rel_1_0_13~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bc90c066b527d123c8a668f6405720a3cea0598;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - not sure why MySQL DROP DBs fail but we can't just ignore the error like this (cherry picked from commit 0e7904e730c3d2b0d3a394ad60010158ee29050c) --- diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index 2797411c71..145f96b276 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -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")