Skip to content

Commit

Permalink
TST: set multi_statement flag for pymysql tests (#19619)
Browse files Browse the repository at this point in the history
* Revert "CI: pin pymysql<0.8.0 (#19461)"

This reverts commit 44bbd5a.

* Enable multi-statements for pymysql connection
  • Loading branch information
jorisvandenbossche authored Feb 11, 2018
1 parent b9d8b26 commit 7a5634e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit 7a5634e

Please sign in to comment.