Test with Python 3.14 and 3.15

The new "test-with" session runs the test suite with non-main Python versions;
yet, `MAIN_PYTHON` stays at 3.13
This commit is contained in:
Alexander Hess 2026-12-02 17:42:43 +01:00
commit 5609e8ec6e
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -10,6 +10,7 @@ By default, `uv run nox` runs the sessions that assure code quality:
Further sessions run on demand with `uv run nox -s <session>`:
- "test-with-x.y": Run the test suite with non-main Python versions
- "docs": Build the documentation with `sphinx`
- "venv": Set up the local develop environment in ".venv"
- "deps-audit": Check dependencies for known vulnerabilities
@ -359,6 +360,17 @@ def test_types(session: nox.Session) -> None:
session.run("pytest", *(session.posargs or (TESTS_LOCATION,)))
# This is a separate session on purpose
# => The "test" session keeps its name and does not become "test-{MAIN_PYTHON}"
@nox.session(
name="test-with",
python=[py for py in SUPPORTED_PYTHONS if py != MAIN_PYTHON],
)
def test_code_with_non_main_python(session: nox.Session) -> None:
"""Run the test suite with non-main Python versions."""
test_code(session)
@nox.session(name="docs", python=MAIN_PYTHON)
def build_docs(session: nox.Session) -> None:
"""Build the documentation with `sphinx`.