Skip to content

Commit 9d6cb64

Browse files
Enable multi-statements for pymysql connection
1 parent 56b3ed3 commit 9d6cb64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/io/test_sql.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,13 +1731,16 @@ class _TestMySQLAlchemy(object):
17311731
@classmethod
17321732
def connect(cls):
17331733
url = 'mysql+{driver}://root@localhost/pandas_nosetest'
1734-
return sqlalchemy.create_engine(url.format(driver=cls.driver))
1734+
return sqlalchemy.create_engine(url.format(driver=cls.driver),
1735+
connect_args=cls.connect_args)
17351736

17361737
@classmethod
17371738
def setup_driver(cls):
17381739
try:
17391740
import pymysql # noqa
17401741
cls.driver = 'pymysql'
1742+
from pymysql.constants import CLIENT
1743+
cls.connect_args = {'client_flag': CLIENT.MULTI_STATEMENTS}
17411744
except ImportError:
17421745
pytest.skip('pymysql not installed')
17431746

0 commit comments

Comments
 (0)