-
Notifications
You must be signed in to change notification settings - Fork 60
/
noxfile.py
31 lines (23 loc) · 918 Bytes
/
noxfile.py
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
28
29
30
31
"""Nox configuration file."""
import nox
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
@nox.parametrize("all_deps", [True, False])
def pytest(session: nox.Session, all_deps: bool) -> None:
"""Run pytest with optional dependencies."""
session.install(".[testing,other]" if all_deps else ".[testing]")
session.run("coverage", "erase")
session.run("pytest")
@nox.session(python="3.11")
def pytest_typeguard(session: nox.Session) -> None:
"""Run pytest with typeguard."""
session.install(".[testing,other]")
session.run("coverage", "erase")
session.run("pytest", "--typeguard-packages=adaptive")
@nox.session(python="3.11")
def coverage(session: nox.Session) -> None:
"""Generate coverage report."""
session.install("coverage")
session.install(".[testing,other]")
session.run("pytest")
session.run("coverage", "report")
session.run("coverage", "xml")