Skip to content

TST: set multi_statement flag for pymysql tests #19619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/requirements-3.6.run
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lxml
html5lib
jinja2
sqlalchemy
pymysql<0.8.0
pymysql
feather-format
pyarrow
psycopg2
Expand Down
5 changes: 4 additions & 1 deletion pandas/tests/io/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,13 +1731,16 @@ class _TestMySQLAlchemy(object):
@classmethod
def connect(cls):
url = 'mysql+{driver}://root@localhost/pandas_nosetest'
return sqlalchemy.create_engine(url.format(driver=cls.driver))
return sqlalchemy.create_engine(url.format(driver=cls.driver),
connect_args=cls.connect_args)

@classmethod
def setup_driver(cls):
try:
import pymysql # noqa
cls.driver = 'pymysql'
from pymysql.constants import CLIENT
cls.connect_args = {'client_flag': CLIENT.MULTI_STATEMENTS}
except ImportError:
pytest.skip('pymysql not installed')

Expand Down