Add debug to tox environment

The oslotest package distributes a shell file that may be used to assist
in debugging python code. The shell file uses testtools, and supports
debugging with pdb.

To enable debugging, run tox with the debug environment. Below are the
following ways to run it.

* tox -e debug module
* tox -e debug module.test_class
* tox -e debug module.test_class.test_method

Change-Id: If0b06dcf094682401c4b09dd72493c678ea2a6b0
This commit is contained in:
Lee Yarwood 2017-07-10 14:41:49 +01:00
parent d1eea7a720
commit a9687a82fc
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@ fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD
openstackdocstheme>=1.11.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
requests-mock>=1.1 # Apache-2.0
sphinx>=1.6.2 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD

View File

@ -36,6 +36,12 @@ commands = flake8 shade
[testenv:venv]
commands = {posargs}
[testenv:debug]
whitelist_externals = find
commands =
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'