Add documentation about using oslo_debug_helper

Change-Id: I7fcae0676aaa2c598dbd14c0c7674d95357c4022
This commit is contained in:
Doug Hellmann 2015-09-24 19:07:30 +00:00
parent a66b4efb33
commit 1c034de9aa
2 changed files with 30 additions and 0 deletions

29
doc/source/debugging.rst Normal file
View File

@ -0,0 +1,29 @@
=================
Debugging Tests
=================
Running tests through testrepository_ makes it difficult to use pdb for
debugging them. oslotest includes ``oslo_debug_helper`` to make using
pdb simpler/possible.
First, add a pdb call to the test code::
import pdb; pdb.set_trace()
Then run the tests through ``oslo_debug_helper`` like
::
$ oslo_debug_helper [tests to run]
or
::
$ tox -e venv -- oslo_debug_helper [tests to run]
.. seealso::
* https://wiki.openstack.org/wiki/Testr
.. _testrepository: https://pypi.python.org/pypi/testrepository

View File

@ -9,6 +9,7 @@
testing
features
cross-testing
debugging
resources
contributing