aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMD NADEEM <mail2nadeem92@gmail.com>2016-09-20 17:48:05 +0530
committerMd Nadeem <md.nadeem@nectechnologies.in>2016-09-21 03:25:42 +0000
commit3bf571da06829e360f690ac565a4127be171ff67 (patch)
treeaf4e90cb0bd70355e0b26273dd1de42f3620ec07 /doc
parent00d0e1bc392cd0f7bca76b18a84e16de4cb82ba9 (diff)
downloadkolla-3bf571da06829e360f690ac565a4127be171ff67.tar.gz
kolla-3bf571da06829e360f690ac565a4127be171ff67.zip
Add support to use pdb with tox
TrivialFix Change-Id: I6f32ce7033fe5a8b8f628a8f52dde67b9540083d
Diffstat (limited to 'doc')
-rw-r--r--doc/running-tests.rst20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/running-tests.rst b/doc/running-tests.rst
index 473cbcc97..53e56dcbd 100644
--- a/doc/running-tests.rst
+++ b/doc/running-tests.rst
@@ -82,7 +82,25 @@ the ``kolla/tests/test_kolla_docker.py``` file:
$ tox -e py27 test_kolla_docker.ModuleArgsTest.test_module_args
+Debugging unit tests
+------------------------
+
+In order to break into the debugger from a unit test we need to insert
+a breaking point to the code:
+
+.. code-block:: python
+
+ import pdb; pdb.set_trace()
+
+Then run ``tox`` with the debug environment as one of the following::
+
+ tox -e debug
+ tox -e debug test_file_name.TestClass.test_name
+
+For more information see the `oslotest documentation
+<http://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper>`_.
+
.. rubric:: Footnotes
-.. [#f1] See http://docs.openstack.org/infra/system-config/jenkins.html
+.. [#f1] See http://docs.openstack.org/infra/system-config/jenkins.html \ No newline at end of file