Run tests on all test environments

$ tox

Create a tox.ini configuration
$ tox-quickstart

List the available environments
$ tox --listenvs-all

Run tests on a specific environment (e.g. Python 3.6)
$ tox -e [py36]

Force the virtual environment to be recreated
$ tox --recreate -e [py27]


tox [options] [args ...]


tox is a generic virtualenv management and test command line tool you can use for:


positional arguments:


additional arguments available to command positional substitution (default: None)

optional arguments:


report version information to stdout. (default: False)

-h, --help

show help about options (default: False)

--help-ini, --hi

show help about ini-names (default: False)


increase verbosity of reporting output.-vv mode turns off output redirection for package installation, above level two verbosity flags are passed through to pip (with two less level) (default: 0)


progressively silence reporting output. (default: 0)


show configuration information for all environments. (default: False)

-l, --listenvs

show list of test environments (with description if verbose) (default: False)

-a, --listenvs-all

show list of all defined environments (with description if verbose) (default: False)


config file name or directory with 'tox.ini' file. (default: None)

-e envlist

work against specified environments (ALL selects all). (default: None)


skip invoking test commands. (default: False)


only perform the sdist packaging activity. (default: False)

-p VAL, --parallel VAL

run tox environments in parallel, the argument controls limit: all, auto - cpu count, some positive number, zero is turn off (default: 0)

-o, --parallel-live

connect to stdout while running environments (default: False)


(deprecated) ensure two tox builds can run in parallel (uses a lock file in the tox workdir with .lock extension) (default: False)

--installpkg PATH

use specified package for installation into venv, instead of creating an sdist. (default: None)


install package in the venv using ' develop' via 'pip -e .' (default: False)

-i URL, --index-url URL

set indexserver url (if URL is of form name=url set the url for the 'name' indexserver, specifically) (default: None)


install pre-releases and development versions of dependencies. This will pass the --pre option to install_command (pip by default). (default: False)

-r, --recreate

force recreation of virtual environments (default: False)

--result-json PATH

write a json file with detailed information about all commands and results involved. (default: None)

--hashseed SEED

set PYTHONHASHSEED to SEED before running commands. Defaults to a random integer in the range [1, 4294967295] ([1, 1024] on Windows). Passing 'noset' suppresses this behavior. (default: None)

--force-dep REQ

Forces a certain version of one of the dependencies when configuring the virtual environment. REQ Examples 'pytest<2.7' or 'django>=1.6'. (default: None)


override sitepackages setting to True in all envs (default: False)


override alwayscopy setting to True in all envs (default: False)

-s [val], --skip-missing-interpreters [val]

don't fail tests for missing interpreters: {config,true,false} choice (default: config)

--workdir PATH

tox working directory (default: None)


TOXENV comma separated list of environments (overridable by '-e')

TOX_SKIP_ENV regular expression to filter down from running tox environments

TOX_TESTENV_PASSENV space-separated list of extra environment variables to be passed into test command environments

PY_COLORS 0 disable colorized output, 1 enable (default)



Copied to clipboard