Running pytest against a specific Python version with uv run

from blog Simon Willison TIL, | ↗ original
While working on this issue I figured out a neat pattern for running the tests for my project locally against a specific Python version using uv run: uv run --python 3.12 --with '.[test]' pytest The new-to-me trick here is that --with '.[test] works for adding the project dependencies and the test dependencies from the setup.py or pyproject.toml...