How to run only one test in tox?

As written by jason meridth:

$ tox -e py35 -- project/tests/

But the fine grain is mentioned by in the comments: If you have a tox.ini file you might need to add the {posargs} to pytest in tox.ini:

envlist = py35

deps =
commands =
    pip install -e .
    pytest {posargs}

Run one test with unittest

python3 -m unittest -q test_file.TestClassName

Leave a Comment