Skip to main content

tox is a generic virtualenv management and test command line tool

Project description

Latest version on PyPi Supported Python versions Azure Pipelines build status Documentation status Code style: black Downloads

tox logo

tox automation project

Command line driven CI frontend and development task automation tool

At its core tox provides a convenient way to run arbitrary commands in isolated environments to serve as a single entry point for build, test and release activities.

tox is highly configurable and pluggable.

Example: run tests with Python 2.7 and Python 3.7

tox is mainly used as a command line tool and needs a tox.ini or a tool.tox section in pyproject.toml containing the configuration.

To test a simple project that has some tests, here is an example with a tox.ini in the root of the project:

[tox]
envlist = py27,py37

[testenv]
deps = pytest
commands = pytest
$ tox

[lots of output from what tox does]
[lots of output from commands that were run]

__________________ summary _________________
  py27: commands succeeded
  py37: commands succeeded
  congratulations :)

tox created two testenvs - one based on Python2.7 and one based on Python3.7, it installed pytest in them and ran the tests. The report at the end summarizes which testenvs have failed and which have succeeded.

Note: To learn more about what you can do with tox, have a look at the collection of examples in the documentation or existing projects using tox.

How it works

tox creates virtual environments for all configured so called testenvs, it then installs the project and other necessary dependencies and runs the configured set of commands. See system overview for more details.

tox flow

tox can be used for ...

  • creating development environments
  • running static code analysis and test tools
  • automating package builds
  • running tests against the package build by tox
  • checking that packages install correctly with different Python versions/interpreters
  • unifying Continuous Integration and command line based testing
  • building and deploying project documentation
  • releasing a package to PyPI or any other platform
  • limit: your imagination

Documentation

Documentation for tox can be found at Read The Docs.

Communication and questions

If you have questions or suggestions you can first check if they have already been answered or discussed on our issue tracker on Stack Overflow (tagged with tox).

If you want to discuss topics or propose changes that might not (yet) fit into an issue, you can get in touch via mail through tox-dev@python.org.

We also have a Gitter community.

Contributing

Contributions are welcome. See contributing and our Contributor Covenant Code of Conduct.

Currently the code and the issues are hosted on Github.

The project is licensed under MIT.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-3.15.2.tar.gz (303.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tox-3.15.2-py2.py3-none-any.whl (137.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tox-3.15.2.tar.gz.

File metadata

  • Download URL: tox-3.15.2.tar.gz
  • Upload date:
  • Size: 303.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for tox-3.15.2.tar.gz
Algorithm Hash digest
SHA256 c696d36cd7c6a28ada2da780400e44851b20ee19ef08cfe73344a1dcebbbe9f3
MD5 cad300222f78feed8fc77fb631dd22ba
BLAKE2b-256 3633f772c9d75572871348c7df7f7a3aeca2607b05ce58606f61cb0d36b7d288

See more details on using hashes here.

File details

Details for the file tox-3.15.2-py2.py3-none-any.whl.

File metadata

  • Download URL: tox-3.15.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 137.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for tox-3.15.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 50a188b8e17580c1fb931f494a754e6507d4185f54fb18aca5ba3e12d2ffd55e
MD5 f68daa7731f3bf298a0921ae956598bb
BLAKE2b-256 c636b0e6016724ae598ba30168618a91d3ee2d7510c20cb05deb8cdc3f7d53b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page