Skip to main content

Adds the --py flag to tox to run environments matching a given Python interpreter.

Project description

https://img.shields.io/github/workflow/status/adamchainz/tox-py/CI/main?style=for-the-badge https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge https://img.shields.io/pypi/v/tox-py.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge pre-commit

Adds the --py flag to tox to run environments matching a given Python interpreter.

Installation

Use pip:

python -m pip install tox-py

Python 3.7 to 3.11 supported.

Only tox 3 is supported. On tox 4, ensure only your target Python version is installed, and run tox --skip-missing-interpreters. (See discussion.)


Testing a Django project? Check out my book Speed Up Your Django Tests which covers loads of ways to write faster, more accurate tests.


Usage

After installation, the plugin will be automatically picked up by tox. It adds one argument: --py, which takes the version to filter environments against. The version can be specified either as a tox.ini-style dotless version number, or the special string current for the version of Python that tox is running under.

For example, to run all Python 3.9 environments:

tox --py 39

Or to run all environments matching the version of Python that tox is running under:

tox --py current

This makes configuring CI really easy: configure your CI to trigger each Python version in parallel, running tox --py current.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-py-1.3.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

tox_py-1.3.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page