Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 34af46b239e4bd529fa8060ba3c2cc13 > files > 102

python3-oslo-test-3.4.1-3.mga7.noarch.rpm

===============
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