bcb3096041
Firstly, add a missing oslo/version/__init__.py. Secondly, move tests from oslo/version/tests/ to tests/ Having the tests under oslo.version and using oslo.sphinx in the same virtual env doesn't seem to work. The issue appears to be that because the tests don't get installed under the namespace package in the venv's site-packages, testr can't find them. Personally, I'm a fan of keeping tests in a different directory from the runtime code and this is what works for oslo.config and oslo.messaging. Thirdly, avoid using 'setup.py develop' with tox. There seems to be an issue with the 'setup.py develop' approach caused by the fact that oslo is a namespace package and we install oslo.sphinx into this namespace in the virtualenv. This results in the oslo.version package not being found when it's not properly installed into the virtualenv. These really should be three separate commits, but any one of them alone causes testr to stop pretending everything is fine so they all need to be merged together. Closes-Bug: #1242614 Change-Id: I5140fa62dc8bdd10a58bd2847b27514a926e3c19
32 lines
594 B
INI
32 lines
594 B
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py26,py27,pypy,pep8
|
|
|
|
[testenv]
|
|
install_command = pip install {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
python setup.py testr --testr-args='{posargs}'
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
commands =
|
|
python setup.py testr --coverage
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
exclude = .venv,.tox,dist,doc,*.egg,build
|
|
show-source = true
|