Add alternative way to use debugger for unittets

Add description about how to use pdb debugger with new tox option:
"debug". This option was added to tox.ini

Change-Id: I8a8934815eb147b4bb60e4ca2f5177f2e58cce76
Co-Authored-By: Tony Wang <muyu@unitedstack.com>
This commit is contained in:
Sergey Kraynev 2015-08-19 11:20:54 -04:00
parent 8b5207ede3
commit d1291a5ca8
2 changed files with 8 additions and 0 deletions

View File

@ -60,3 +60,8 @@ running single tests by providing a regex.
testlist=$(mktemp)
testr list-tests "$1" > $testlist
python -m testtools.run --load-list $testlist
Another way to use debugger for testing is run tox with command:
$ tox -e debug -- heat.tests.test_stack.StackTest.test_stack_reads_tenant
Note: last approach is mostly useful to run single tests.

View File

@ -81,3 +81,6 @@ max-complexity=20
[hacking]
import_exceptions = heat.common.i18n
[testenv:debug]
commands = oslo_debug_helper {posargs}