Forrest logo
tool overview
On this page you find all important commands for the CLI tool tox. If the command you are looking for is missing please ask our AI.

tox

Tox is a command line tool used for automating and managing software testing in multiple environments. It allows developers to define testing environments easily using a simple configuration file called "tox.ini."

Tox solves the problem of testing software across different versions of Python, virtual environments, and other dependencies. It works by creating isolated environments for each testing scenario defined in the "tox.ini" file, ensuring the test results are consistent regardless of the host environment.

Through tox, developers can automatically run unit tests, functional tests, integration tests, and other test suites across different environments by simply executing the "tox" command.

Tox supports various test runners such as pytest, unittest, and nose, allowing developers to write tests using their preferred testing framework.

It can automatically install dependencies for each testing environment, eliminating the need for manual installation and ensuring reproducibility.

Tox also provides a plugin system, allowing developers to extend its functionality. Useful plugins are available for coverage reporting, parallel testing, and test runtime isolation, among others.

It integrates well with continuous integration (CI) tools like Jenkins and Travis CI, making it easy to incorporate tox into existing development workflows.

Tox provides configurable test environments, making it possible to test against different Python versions, third-party libraries, and system configurations.

It supports parallel testing, enabling faster test execution by leveraging the available CPU resources efficiently.

Tox is widely used in the Python community and has become a standard tool for managing and automating testing workflows.

List of commands for tox:

  • tox:tldr:1031d tox: Force the virtual environment to be recreated.
    $ tox --recreate -e ${py27}
    try on your machine
    explain this command
  • tox:tldr:87b5e tox: List the available environments.
    $ tox --listenvs-all
    try on your machine
    explain this command
  • tox:tldr:ad721 tox: Run tests on a specific environment (e.g. Python 3.6).
    $ tox -e ${py36}
    try on your machine
    explain this command
  • tox:tldr:f6372 tox: Run tests on all test environments.
    $ tox
    try on your machine
    explain this command
tool overview