Skip to content
Command line driven CI frontend and development task automation tool
Python
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Enforce rst file extension @ change fragments (#1371) Jul 11, 2019
docs Fix changelog for 3.14.6 (#1543) Mar 27, 2020
src/tox Fix exeception when command is empty (#1544) Mar 27, 2020
tasks Correct capitalization of PyPI (#1084) Nov 12, 2018
tests Fix exeception when command is empty (#1544) Mar 27, 2020
.gitignore refactor session (#1145) Feb 5, 2019
.pre-commit-config.yaml Fix changelog for 3.14.6 (#1543) Mar 27, 2020
CODE_OF_CONDUCT.md Update Contributor Covenant URL to use https:// (#1082) Nov 12, 2018
CONTRIBUTING.rst Fix spelling of `fix_lint` in contributing info. (#1166) Feb 11, 2019
CONTRIBUTORS Fix parsing of architecture in python interpreter name (#1542) Mar 26, 2020
HOWTORELEASE.rst Fix bash code blocks in HOWTORELEASE.rst (#1351) Jun 25, 2019
LICENSE Add a pre-commit configuration (#623) Sep 10, 2017
MANIFEST.in Fix typo (#1157) Feb 3, 2019
README.md Update README.md Oct 16, 2019
azure-pipelines.yml fix pypy CI failure (#1521) Feb 13, 2020
pyproject.toml Split up packaging for better separation of concerns (#1069) Oct 22, 2018
readthedocs.yml CI - better coverage report, pypy on Azure, add codeclimate (#1031) Oct 3, 2018
setup.cfg Exclude virtualenvs vers w/ regressions 20.0.[0-7] (#1537) Mar 22, 2020
setup.py use setup.cfg (#1187) Mar 12, 2019
tox.ini Fix `tox --help` and `tox --help-ini` shows an error when run o… (#1539) Mar 22, 2020

README.md

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 povides 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.

You can’t perform that action at this time.