Browse Source

Add a debug env for unit tests

Debugging unit tests locally with pdb ends in failure with tox.
this patch adds debug environment to debug tests with pdb
break points by following below steps.

1. set break point in code by adding import pdb;pdb.set_trace
2. run tox -e debug test_regex

Change-Id: I088a558a1fb68b3bc2a218ccda0911ed1389f91f
changes/53/564953/1
Manjeet Singh Bhatia 3 years ago
parent
commit
dd8aea24bd
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tox.ini

+ 3
- 0
tox.ini View File

@ -20,6 +20,9 @@ commands =
# there is also secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:debug]
commands = oslo_debug_helper -t neutron/tests {posargs}
[testenv:common]
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}


Loading…
Cancel
Save