Skip to content

Instantly share code, notes, and snippets.

@4383

4383/debug.md

Last active Jun 5, 2020
Embed
What would you like to do?
tox debug

Run only a specific test with tox:

$ tox -e py38 -- oslo_service.tests.test_wsgi.TestWSGIServerWithSSL.test_ssl_server

Run command in a virtualenv managed by tox:

$ tox -e venv -- <command>

Use pdb on a specific unit test with tox:

$ # first you should import pdb in your test/code
$ tox -e venv -- python -m testtools.run oslo_service.tests.test_wsgi.TestWSGIServerWithSSL.test_ssl_server

Watch listening sockets and connections during test execution:

$ watch -n 5 'echo -e "Listen:\n" && netstat -tunlp | grep python && echo -e "\nConnections:\n" && ss -4tnp | grep python'
$ tox -e venv -- python -m testtools.run oslo_service.tests.test_wsgi.TestWSGIServerWithSSL.test_ssl_server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.