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:
parent
a85d426b6e
commit
5609e8ec6e
2 changed files with 14 additions and 0 deletions
12
noxfile.py
12
noxfile.py
|
|
@ -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>`:
|
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`
|
- "docs": Build the documentation with `sphinx`
|
||||||
- "venv": Set up the local develop environment in ".venv"
|
- "venv": Set up the local develop environment in ".venv"
|
||||||
- "deps-audit": Check dependencies for known vulnerabilities
|
- "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,)))
|
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)
|
@nox.session(name="docs", python=MAIN_PYTHON)
|
||||||
def build_docs(session: nox.Session) -> None:
|
def build_docs(session: nox.Session) -> None:
|
||||||
"""Build the documentation with `sphinx`.
|
"""Build the documentation with `sphinx`.
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ classifiers = [
|
||||||
# loaded by `nox`, our task runner, and made available
|
# loaded by `nox`, our task runner, and made available
|
||||||
# for testing in isolated environments
|
# for testing in isolated environments
|
||||||
"Programming Language :: Python :: 3.13",
|
"Programming Language :: Python :: 3.13",
|
||||||
|
"Programming Language :: Python :: 3.14",
|
||||||
|
"Programming Language :: Python :: 3.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
requires-python = ">=3.13,<4.0"
|
requires-python = ">=3.13,<4.0"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue