summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2014-01-12 11:32:15 -0600
committerBrant Knudson <bknudson@us.ibm.com>2014-01-14 14:48:02 -0600
commit8ac5b7576dbf48c675cb38794adc214093eed1c2 (patch)
treea7d2bbdaa23278b714fd80d9bb2c35f3d68f3375
parenteb79d256b39660dfe0b91667ca4663f520ef20cf (diff)
downloadkeystone-8ac5b7576dbf48c675cb38794adc214093eed1c2.tar.gz
Document running with pdb
There was no documentation in "Developing with Keystone" that makes it obvious that you can use "tox -e debug" to run with pdb breakpoints. Change-Id: I82cc827d076a4d95ab6a2f903ceb0cde34005bc3
-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
==============