Skip to main content
Warning Some features may not work without JavaScript. Please try enabling it if you encounter problems.

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 3.7 and Python 3.8

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 = py37,py38

[testenv]
deps = pytest
commands = pytest
$ tox

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

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

tox created two testenvs - one based on Python3.7 and one based on Python3.8, 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.20.1.tar.gz (306.8 kB view details)

Uploaded Source

Built Distribution

tox-3.20.1-py2.py3-none-any.whl (83.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: tox-3.20.1.tar.gz
  • Upload date:
  • Size: 306.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for tox-3.20.1.tar.gz
Algorithm Hash digest
SHA256 4321052bfe28f9d85082341ca8e233e3ea901fdd14dab8a5d3fbd810269fbaf6
MD5 ee15e2a79e22ed16d22222477ee759e4
BLAKE2b-256 fe667206a6c69a5f717fb80cd3a532c0639bc183ad2aa1f23a943ca93b0814bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tox-3.20.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 83.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for tox-3.20.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 42ce19ce5dc2f6d6b1fdc5666c476e1f1e2897359b47e0aa3a5b774f335d57c2
MD5 a70d1817943fb250cf730a0eddedcccc
BLAKE2b-256 e0795915b9dad867e89bb6495456acfe5d4e2287e74dfa29c059f7b127d5480e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page
Morty Proxy This is a proxified and sanitized view of the page, visit original site.