Skip to content

Commit c34fd2b

Browse files
author
Thomas Grainger
committed
Split DROP/CREATE procedure over two sqlalchemy calls
When running with two queries at the same time, if one raises a warning and the other doesn't PyMySQL raises a TypeError.
1 parent 753f78c commit c34fd2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/tests/test_sql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1481,8 +1481,7 @@ def test_read_procedure(self):
14811481
df = DataFrame({'a': [1, 2, 3], 'b':[0.1, 0.2, 0.3]})
14821482
df.to_sql('test_procedure', self.conn, index=False)
14831483

1484-
proc = """DROP PROCEDURE IF EXISTS get_testdb;
1485-
1484+
proc = """
14861485
CREATE PROCEDURE get_testdb ()
14871486
14881487
BEGIN
@@ -1492,6 +1491,7 @@ def test_read_procedure(self):
14921491
connection = self.conn.connect()
14931492
trans = connection.begin()
14941493
try:
1494+
connection.execute("DROP PROCEDURE IF EXISTS get_testdb")
14951495
r1 = connection.execute(proc)
14961496
trans.commit()
14971497
except:

0 commit comments

Comments
 (0)