From fcc435704a9b0fc0a991976d8ddda7812742075f Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Thu, 9 Mar 2017 23:57:17 +0700 Subject: [PATCH] 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 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index c29d216..98bd35a 100644 --- a/tox.ini +++ b/tox.ini @@ -20,11 +20,11 @@ commands = {toxinidir}/tools/cover.sh {posargs} [testenv:debug-py27] basepython = python2.7 -commands = oslo_debug_helper {posargs} +commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:debug-py35] basepython = python3.5 -commands = oslo_debug_helper {posargs} +commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:pep8] 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. # 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 -commands = oslo_debug_helper {posargs} +commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:bandit] deps = -r{toxinidir}/test-requirements-bandit.txt