Use PyMySQL as DB driver in py3 environment
MySQLDb driver works only with python2.x, so we should use an another connector for work with python3. Used OS_TEST_DBAPI_ADMIN_CONNECTION env variable to set connection strings. Change-Id: I27fbe8f87c713b53a0b1831543a23f7c06fe454b
This commit is contained in:
parent
2b9d075076
commit
fa43657e9a
@ -13,9 +13,7 @@ python-subunit>=0.0.18
|
|||||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||||
oslosphinx>=2.2.0 # Apache-2.0
|
oslosphinx>=2.2.0 # Apache-2.0
|
||||||
oslotest>=1.2.0 # Apache-2.0
|
oslotest>=1.2.0 # Apache-2.0
|
||||||
|
PyMySQL>=0.6.2 # MIT License
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
testtools>=0.9.36,!=1.2.0
|
testtools>=0.9.36,!=1.2.0
|
||||||
tempest-lib>=0.2.0
|
tempest-lib>=0.2.0
|
||||||
|
|
||||||
# TODO(harlowja): add in pymysql when able to...
|
|
||||||
# https://review.openstack.org/#/c/123737
|
|
||||||
|
6
tox.ini
6
tox.ini
@ -26,10 +26,16 @@ commands = pip install SQLAlchemy>=0.8.0,<0.9.0
|
|||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:py34]
|
[testenv:py34]
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
OS_TEST_DBAPI_ADMIN_CONNECTION=mysql+pymysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite://
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements-py3.txt
|
-r{toxinidir}/test-requirements-py3.txt
|
||||||
|
|
||||||
[testenv:py33]
|
[testenv:py33]
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
OS_TEST_DBAPI_ADMIN_CONNECTION=mysql+pymysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite://
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements-py3.txt
|
-r{toxinidir}/test-requirements-py3.txt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user