HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

tox — Automate Python testing across multiple Python versions. Use tox.ini to configure environments and t

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandmultiplepythonautomatecliacrosstoxtesting

Problem

How to use the tox command: Automate Python testing across multiple Python versions. Use tox.ini to configure environments and test command. More information: <https://github.com/tox-dev/tox>.

Solution

tox — Automate Python testing across multiple Python versions. Use tox.ini to configure environments and test command. More information: <https://github.com/tox-dev/tox>.

Run tests on all test environments:
tox


Create a tox.ini configuration:
tox-quickstart


List the available environments:
tox {{[-a|--listenvs-all]}}


Run tests on a specific environment (e.g. Python 3.6):
tox -e {{py36}}


Force the virtual environment to be recreated:
tox {{[-r|--recreate]}} -e {{py27}}

Code Snippets

Run tests on all test environments

tox

Create a `tox.ini` configuration

tox-quickstart

List the available environments

tox {{[-a|--listenvs-all]}}

Run tests on a specific environment (e.g. Python 3.6)

tox -e {{py36}}

Force the virtual environment to be recreated

tox {{[-r|--recreate]}} -e {{py27}}

Context

tldr-pages: common/tox

Revisions (0)

No revisions yet.