Skip to main content

tox is a generic virtualenv management and test command line tool

Project description

PyPI Supported Python versions check 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 Python 3.7 and one based on Python 3.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 built 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

For the fastest and interactive feedback please join our Discord server. 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).

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.24.5.tar.gz (315.6 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.24.5-py2.py3-none-any.whl (85.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: tox-3.24.5.tar.gz
  • Upload date:
  • Size: 315.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tox-3.24.5.tar.gz
Algorithm Hash digest
SHA256 67e0e32c90e278251fea45b696d0fef3879089ccbe979b0c556d35d5a70e2993
MD5 0da4fd97c5bb907f6e3e346f04ed8d34
BLAKE2b-256 6c0eb9789bd4eee8cc8adfb8127730a13dfcf2d5cc7c419da904cf6fbf459d37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tox-3.24.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 85.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tox-3.24.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 be3362472a33094bce26727f5f771ca0facf6dafa217f65875314e9a6600c95c
MD5 46a5a6bf08a183a7d95cd29d993a0b10
BLAKE2b-256 d6f014e68ea6e4bf9ef280c476fc1ab68782032d7fb1178124b1326ad6dfd039

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