Remove customized pyX.Y tox requirements
Instead of having custom pyX.Y that test a specific set of requirements and similar with other tox envs, just enable more test-requirements directly, in a later change we will use environment markers to denote the differences. Also tweaks the jobboard example to bypass/hack a needed eventlet fix into it so that it actually runs without breaking/never finishing. A TODO note has been left to eventually (someday?) remove this hack when it is no longer needed. Part of fix for bug 1445827 Change-Id: I0fb669f0bdfbe4fe81d89234173f2c3ac4d06de6
This commit is contained in:
@@ -30,6 +30,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
|
|||||||
os.pardir))
|
os.pardir))
|
||||||
sys.path.insert(0, top_dir)
|
sys.path.insert(0, top_dir)
|
||||||
|
|
||||||
|
import six
|
||||||
from six.moves import range as compat_range
|
from six.moves import range as compat_range
|
||||||
from zake import fake_client
|
from zake import fake_client
|
||||||
|
|
||||||
@@ -150,6 +151,14 @@ def producer(ident, client):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if six.PY3:
|
||||||
|
# TODO(harlowja): Hack to make eventlet work right, remove when the
|
||||||
|
# following is fixed: https://github.com/eventlet/eventlet/issues/230
|
||||||
|
from taskflow.utils import eventlet_utils as _eu # noqa
|
||||||
|
try:
|
||||||
|
import eventlet as _eventlet # noqa
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
with contextlib.closing(fake_client.FakeClient()) as c:
|
with contextlib.closing(fake_client.FakeClient()) as c:
|
||||||
created = []
|
created = []
|
||||||
for i in compat_range(0, PRODUCERS):
|
for i in compat_range(0, PRODUCERS):
|
||||||
|
|||||||
@@ -16,17 +16,13 @@ zake>=0.1.6 # Apache-2.0
|
|||||||
kazoo>=1.3.1,!=2.1
|
kazoo>=1.3.1,!=2.1
|
||||||
|
|
||||||
# Used for testing database persistence backends.
|
# Used for testing database persistence backends.
|
||||||
#
|
SQLAlchemy>=0.9.7,<=0.9.99
|
||||||
# NOTE(harlowja): SQLAlchemy isn't listed here currently but is
|
|
||||||
# listed in our tox.ini files so that we can test multiple varying SQLAlchemy
|
|
||||||
# versions to ensure a wider range of compatibility.
|
|
||||||
#
|
|
||||||
# Explict mysql drivers are also not listed here so that we can test against
|
|
||||||
# PyMySQL or MySQL-python depending on the python version the tests are being
|
|
||||||
# ran in (MySQL-python is currently preferred for 2.x environments, since
|
|
||||||
# it has been used in openstack for the longest).
|
|
||||||
alembic>=0.7.2
|
alembic>=0.7.2
|
||||||
psycopg2
|
psycopg2
|
||||||
|
PyMySQL>=0.6.2
|
||||||
|
|
||||||
|
# Used for making sure we still work with eventlet.
|
||||||
|
eventlet>=0.17.3
|
||||||
|
|
||||||
# Docs build jobs need these packages.
|
# Docs build jobs need these packages.
|
||||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||||
|
|||||||
18
tox.ini
18
tox.ini
@@ -62,28 +62,10 @@ import_exceptions = six.moves
|
|||||||
taskflow.test.mock
|
taskflow.test.mock
|
||||||
unittest.mock
|
unittest.mock
|
||||||
|
|
||||||
# NOTE(imelnikov): pyXY envs are considered to be default, so they must have
|
|
||||||
# richest set of test requirements
|
|
||||||
[testenv:py26]
|
|
||||||
basepython = python2.6
|
|
||||||
deps = {[testenv]deps}
|
|
||||||
MySQL-python
|
|
||||||
eventlet>=0.15.1
|
|
||||||
SQLAlchemy>=0.7.8,<=0.8.99
|
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
deps = {[testenv]deps}
|
deps = {[testenv]deps}
|
||||||
MySQL-python
|
|
||||||
eventlet>=0.15.1
|
|
||||||
SQLAlchemy>=0.7.8,<=0.9.99
|
|
||||||
doc8
|
doc8
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
sphinx-build -b doctest doc/source doc/build
|
sphinx-build -b doctest doc/source doc/build
|
||||||
doc8 doc/source
|
doc8 doc/source
|
||||||
|
|
||||||
[testenv:py34]
|
|
||||||
deps = {[testenv]deps}
|
|
||||||
SQLAlchemy>=0.7.8,<=0.9.99
|
|
||||||
PyMySQL>=0.6.2
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user