2025-03-14 21:59:59 -06:00
|
|
|
# tox
|
|
|
|
|
|
|
|
|
|
> Automate Python testing across multiple Python versions.
|
|
|
|
|
> Use tox.ini to configure environments and test command.
|
|
|
|
|
> More information: <https://github.com/tox-dev/tox>.
|
|
|
|
|
|
|
|
|
|
- Run tests on all test environments:
|
|
|
|
|
|
|
|
|
|
`tox`
|
|
|
|
|
|
|
|
|
|
- Create a `tox.ini` configuration:
|
|
|
|
|
|
|
|
|
|
`tox-quickstart`
|
|
|
|
|
|
|
|
|
|
- List the available environments:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`tox {{[-a|--listenvs-all]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run tests on a specific environment (e.g. Python 3.6):
|
|
|
|
|
|
|
|
|
|
`tox -e {{py36}}`
|
|
|
|
|
|
|
|
|
|
- Force the virtual environment to be recreated:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`tox {{[-r|--recreate]}} -e {{py27}}`
|