-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnoxfile.py
More file actions
27 lines (22 loc) · 703 Bytes
/
noxfile.py
File metadata and controls
27 lines (22 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Nox sessions for multi-version testing."""
import nox
nox.options.default_venv_backend = "uv"
# Read supported Python versions from pyproject.toml classifiers
PYPROJECT = nox.project.load_toml("pyproject.toml")
PYTHON_VERSIONS = nox.project.python_versions(PYPROJECT)
@nox.session(python=PYTHON_VERSIONS)
def tests(session: nox.Session) -> None:
"""Run the test suite with coverage for each Python version."""
session.install(
"pytest>=8.2.0",
"pytest-cov>=5.0.0",
"coverage[toml]>=7.5.1",
".",
)
session.run(
"pytest",
"--cov=countdown",
"--cov=tests",
"--cov-report=term-missing",
*session.posargs,
)