Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox for easy testing of many Python versions #523

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 16, 2024

The tox tool makes it easy to test by taking care of the virtualenv for you and installing dependencies (defined by a tests "extra"). It also makes it easy to test multiple Python versions.

For example:

# Test Python 3.12
tox -e py312

# Test Python 3.12 and pass an argument to pytest
tox -e py312 -- --stepwise

# Test all available Python versions in serial
tox

# Test all available Python versions in parallel
tox -p auto

This PR also:

  • Adds support for Python 3.13
  • Updates pyproject.toml to use standard metadata instead of tool-specific (flit), so we can add a tests extra to [project.optional-dependencies]
  • Adds simple pre-commit config for linting, and to the CI

@ambv ambv merged commit 67b7836 into python:main Mar 6, 2024
10 checks passed
@hugovk hugovk deleted the add-tox branch March 6, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants