summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-01-21 19:31:22 +0000
committerGerrit Code Review <review@openstack.org>2014-01-21 19:31:22 +0000
commite5ac1709fd2fd1909aa3216e45a90d590567cc74 (patch)
treec52292ad8dbcc07c9e7c1f8096093710b7c3a83d
parentb7b81344786cf54d362aac1148df37fb91e5fa04 (diff)
parent8ac5b7576dbf48c675cb38794adc214093eed1c2 (diff)
downloadkeystone-e5ac1709fd2fd1909aa3216e45a90d590567cc74.tar.gz
Merge "Document running with pdb"
-rw-r--r--doc/source/developing.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/source/developing.rst b/doc/source/developing.rst
index f7af31497..fee960c28 100644
--- a/doc/source/developing.rst
+++ b/doc/source/developing.rst
@@ -160,6 +160,21 @@ common configuration of Python 2.7 and PEP-8), list the environments with the
See ``tox.ini`` for the full list of available test environments.
+Running with PDB
+~~~~~~~~~~~~~~~~
+
+Using PDB breakpoints with tox and testr normally doesn't work since the tests
+just fail with a BdbQuit exception rather than stopping at the breakpoint.
+
+To run with PDB breakpoints during testing, use the ``debug`` tox environment
+rather than ``py27``. Here's an example, passing the name of a test since
+you'll normally only want to run the test that hits your breakpoint::
+
+ $ tox -e debug keystone.tests.test_auth.AuthWithToken.test_belongs_to
+
+For reference, the ``debug`` tox environment implements the instructions
+here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
+
Test Structure
==============