Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
3bf571da
Commit
3bf571da
authored
8 years ago
by
MD NADEEM
Committed by
Md Nadeem
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add support to use pdb with tox
TrivialFix Change-Id: I6f32ce7033fe5a8b8f628a8f52dde67b9540083d
parent
00d0e1bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/running-tests.rst
+19
-1
19 additions, 1 deletion
doc/running-tests.rst
tox.ini
+3
-0
3 additions, 0 deletions
tox.ini
with
22 additions
and
1 deletion
doc/running-tests.rst
+
19
−
1
View file @
3bf571da
...
...
@@ -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
This diff is collapsed.
Click to expand it.
tox.ini
+
3
−
0
View file @
3bf571da
...
...
@@ -17,6 +17,9 @@ commands =
find
.
-type
f
-name
"*.pyc"
-delete
python
setup.py
test
--slowest
--testr-args
=
'{posargs}'
[testenv:debug]
commands
=
oslo_debug_helper {posargs}
[testenv:pep8]
commands
=
{toxinidir}/tools/run-bashate.sh
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment