Rename the "doctest" session into "test-docstrings"
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 2m46s
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 2m46s
This commit is contained in:
parent
f47c87f51f
commit
cfd8d33049
3 changed files with 8 additions and 8 deletions
|
|
@ -78,8 +78,8 @@ jobs:
|
||||||
- name: Run the test suite
|
- name: Run the test suite
|
||||||
run: uv run nox -s test
|
run: uv run nox -s test
|
||||||
|
|
||||||
- name: Run the doctests
|
- name: Test the code snippets in the docstrings with `xdoctest`
|
||||||
run: uv run nox -s doctest
|
run: uv run nox -s test-docstrings
|
||||||
|
|
||||||
- name: Check the type annotations at runtime with `typeguard`
|
- name: Check the type annotations at runtime with `typeguard`
|
||||||
run: uv run nox -s test-types
|
run: uv run nox -s test-types
|
||||||
|
|
@ -87,4 +87,4 @@ jobs:
|
||||||
- name: Run the `pre-commit` hooks not covered by `nox`
|
- name: Run the `pre-commit` hooks not covered by `nox`
|
||||||
run: uv run pre-commit run --all-files --show-diff-on-failure
|
run: uv run pre-commit run --all-files --show-diff-on-failure
|
||||||
env:
|
env:
|
||||||
SKIP: local-format,local-lint,local-test,local-doctest,local-test-types,no-commit-to-branch
|
SKIP: local-format,local-lint,local-test,local-test-docstrings,local-test-types,no-commit-to-branch
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ repos:
|
||||||
always_run: true
|
always_run: true
|
||||||
require_serial: true
|
require_serial: true
|
||||||
|
|
||||||
- id: local-doctest
|
- id: local-test-docstrings
|
||||||
name: Run the doctests
|
name: Run the doctests
|
||||||
entry: uv run nox -s doctest
|
entry: uv run nox -s test-docstrings
|
||||||
language: unsupported
|
language: unsupported
|
||||||
stages: [pre-merge-commit]
|
stages: [pre-merge-commit]
|
||||||
pass_filenames: false # => No `--` at the end of the "entry"
|
pass_filenames: false # => No `--` at the end of the "entry"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ By default, `uv run nox` runs the sessions that assure code quality:
|
||||||
- "format": Format source files with `autoflake`, `black`, `flynt`, `isort`, and `ruff`
|
- "format": Format source files with `autoflake`, `black`, `flynt`, `isort`, and `ruff`
|
||||||
- "lint": Lint source files with `flake8`, `isort`, `mypy`, `pyright`, and `ruff`
|
- "lint": Lint source files with `flake8`, `isort`, `mypy`, `pyright`, and `ruff`
|
||||||
- "test": Run the test suite with `pytest`
|
- "test": Run the test suite with `pytest`
|
||||||
- "doctest": Check if code snippets in the docstrings run
|
- "test-docstrings": Check if code snippets in the docstrings run
|
||||||
- "test-types": Run the test suite with runtime type checks by `typeguard`
|
- "test-types": Run the test suite with runtime type checks by `typeguard`
|
||||||
|
|
||||||
Further sessions run on demand with `uv run nox -s <session>`:
|
Further sessions run on demand with `uv run nox -s <session>`:
|
||||||
|
|
@ -151,7 +151,7 @@ nox.options.sessions = (
|
||||||
"format",
|
"format",
|
||||||
"lint",
|
"lint",
|
||||||
"test",
|
"test",
|
||||||
"doctest",
|
"test-docstrings",
|
||||||
"test-types",
|
"test-types",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ def test_code(session: nox.Session) -> None:
|
||||||
session.run("pytest", *(session.posargs or pytest_default_args))
|
session.run("pytest", *(session.posargs or pytest_default_args))
|
||||||
|
|
||||||
|
|
||||||
@nox.session(name="doctest", python=MAIN_PYTHON)
|
@nox.session(name="test-docstrings", python=MAIN_PYTHON)
|
||||||
def test_docstrings(session: nox.Session) -> None:
|
def test_docstrings(session: nox.Session) -> None:
|
||||||
"""Test the code snippets in the docstrings with `xdoctest`.
|
"""Test the code snippets in the docstrings with `xdoctest`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue