Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to oslo_debug_helper to indicate the directory where tests are located. This will solves ImportError exception. [1] https://docs.openstack.org/developer/oslotest/features.html Change-Id: I1b6b965f5e999aac85adf97ac7c0cb0a0edce41e Closes-Bug: #1666560
This commit is contained in:
6
tox.ini
6
tox.ini
@@ -20,11 +20,11 @@ commands = {toxinidir}/tools/cover.sh {posargs}
|
|||||||
|
|
||||||
[testenv:debug-py27]
|
[testenv:debug-py27]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper -t sahara/tests/unit {posargs}
|
||||||
|
|
||||||
[testenv:debug-py35]
|
[testenv:debug-py35]
|
||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper -t sahara/tests/unit {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
@@ -89,7 +89,7 @@ commands = pip-missing-reqs -d --ignore-file=sahara/tests/* sahara
|
|||||||
# in interactive mode, so, you could use pbr for tests debug.
|
# in interactive mode, so, you could use pbr for tests debug.
|
||||||
# Example usage: tox -e debug -- -t sahara/tests/unit some.test.path
|
# Example usage: tox -e debug -- -t sahara/tests/unit some.test.path
|
||||||
# http://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper
|
# http://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper -t sahara/tests/unit {posargs}
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
deps = -r{toxinidir}/test-requirements-bandit.txt
|
deps = -r{toxinidir}/test-requirements-bandit.txt
|
||||||
|
Reference in New Issue
Block a user