From 0b6abba5d387940f142493f3675b4e2a9d631287 Mon Sep 17 00:00:00 2001 From: Yadnesh Kulkarni Date: Mon, 4 Jul 2022 10:12:49 +0000 Subject: Add debug to tox environment The oslotest package distributes a shell file that may be used to assist in debugging python code. The shell file uses testtools, and supports debugging with pdb. To enable debugging, run tox with the debug environment. Below are the following ways to run it. * tox -e debug module * tox -e debug module.test_class * tox -e debug module.test_class.test_method Signed-off-by: Yadnesh Kulkarni Change-Id: I7015ab52ba3f5075b5e06992bb8d72f52104a24e --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index d76f1f03..cb7fc7bc 100644 --- a/tox.ini +++ b/tox.ini @@ -60,6 +60,11 @@ commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf +[testenv:debug] +commands= + find . -type f -name "*.pyc" -delete + oslo_debug_helper {posargs} + [testenv:venv] commands = {posargs} setenv = PYTHONHASHSEED=0 -- cgit v1.2.1