doc: use uv run --isolated for other-Python test runs
A bare `uv run --python 3.8` rebuilds the project .venv on 3.8, after which the pre-commit hook (pre-commit-hooks needs >=3.9) fails on commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ uv sync # .venv with the package (editable) + dev group
|
||||
uv run pytest # full suite (testpaths = tests)
|
||||
uv run pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults # single test
|
||||
uv run pytest -k "<keyword>"
|
||||
uv run --python 3.8 pytest # any supported Python; uv.lock forks per version
|
||||
uv run --isolated --python 3.8 pytest # any supported Python, without switching .venv
|
||||
|
||||
uv run ruff check --fix # lint + import sorting (config in pyproject.toml)
|
||||
uv run ruff format # formatter, line length 88
|
||||
|
||||
@@ -86,7 +86,7 @@ or
|
||||
uv run pytest # full suite
|
||||
uv run pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults
|
||||
uv run pytest -k "<keyword>"
|
||||
uv run --python 3.8 pytest # against another supported Python
|
||||
uv run --isolated --python 3.8 pytest # another supported Python; --isolated keeps .venv as is
|
||||
```
|
||||
|
||||
# Development
|
||||
|
||||
@@ -305,7 +305,7 @@ Expected: `Resolved N packages`, and the sync installs into `.venv/`. The lock f
|
||||
Run:
|
||||
```bash
|
||||
uv run pytest -q
|
||||
uv run --python 3.8 pytest -q
|
||||
uv run --isolated --python 3.8 pytest -q
|
||||
uv run ruff check && uv run ruff format --check
|
||||
git status --short
|
||||
```
|
||||
@@ -383,7 +383,7 @@ Replace everything from `# Tests` up to (not including) `# License` with:
|
||||
uv run pytest # full suite
|
||||
uv run pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults
|
||||
uv run pytest -k "<keyword>"
|
||||
uv run --python 3.8 pytest # against another supported Python
|
||||
uv run --isolated --python 3.8 pytest # against another supported Python
|
||||
```
|
||||
|
||||
# Development
|
||||
@@ -469,7 +469,7 @@ uv sync # .venv with the package (editable) + dev group
|
||||
uv run pytest # full suite (testpaths = tests)
|
||||
uv run pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults # single test
|
||||
uv run pytest -k "<keyword>"
|
||||
uv run --python 3.8 pytest # any supported Python; uv.lock forks per version
|
||||
uv run --isolated --python 3.8 pytest # any supported Python; uv.lock forks per version
|
||||
|
||||
uv run ruff check --fix # lint + import sorting (config in pyproject.toml)
|
||||
uv run ruff format # formatter, line length 88
|
||||
@@ -886,13 +886,13 @@ Run again. Expected: all pass, 1 skipped.
|
||||
|
||||
```bash
|
||||
uv run ruff check && uv run ruff format --check
|
||||
uv run --python 3.8 pytest -q
|
||||
uv run --python 3.9 pytest -q
|
||||
uv run --python 3.10 pytest -q
|
||||
uv run --python 3.11 pytest -q
|
||||
uv run --python 3.12 pytest -q
|
||||
uv run --python 3.13 pytest -q
|
||||
uv run --python 3.14 pytest -q
|
||||
uv run --isolated --python 3.8 pytest -q
|
||||
uv run --isolated --python 3.9 pytest -q
|
||||
uv run --isolated --python 3.10 pytest -q
|
||||
uv run --isolated --python 3.11 pytest -q
|
||||
uv run --isolated --python 3.12 pytest -q
|
||||
uv run --isolated --python 3.13 pytest -q
|
||||
uv run --isolated --python 3.14 pytest -q
|
||||
```
|
||||
Expected: lint clean, and every lane `N passed, 1 skipped`. Also run Task 4 step 5 with `--python 3.14`, which repeats the smoke step on the newest lane.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user