Skip to content

Commit 7a5634e

Browse files
TST: set multi_statement flag for pymysql tests (pandas-dev#19619)
* Revert "CI: pin pymysql<0.8.0 (pandas-dev#19461)" This reverts commit 44bbd5a. * Enable multi-statements for pymysql connection
1 parent b9d8b26 commit 7a5634e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ci/requirements-3.6.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lxml
1313
html5lib
1414
jinja2
1515
sqlalchemy
16-
pymysql<0.8.0
16+
pymysql
1717
feather-format
1818
pyarrow
1919
psycopg2

pandas/tests/io/test_sql.py

+4-1
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)