File: debugging.rst

package info (click to toggle)
python-oslotest 1%3A4.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 412 kB
  • sloc: python: 970; sh: 95; makefile: 21
file content (29 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.org/project/testrepository