-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
32 lines (22 loc) · 643 Bytes
/
noxfile.py
File metadata and controls
32 lines (22 loc) · 643 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
28
29
30
31
32
from __future__ import annotations
import os
import nox
os.environ.update({"PDM_IGNORE_SAVED_PYTHON": "1"})
nox.options.reuse_existing_virtualenvs = True
nox.options.error_on_external_run = True
PYTHON_VERSIONS = ["3.12", "3.11", "3.10", "3.9", "3.8"]
COMMON_PYTEST_OPTIONS = [
"--cov=.",
"--cov-append",
"--cov-report=xml",
"--showlocals",
"-vv",
]
@nox.session(python=PYTHON_VERSIONS, name="Tests", tags=["tests"])
def tests(session: nox.Session) -> None:
session.run_always("pdm", "install", external=True)
session.run("pytest")
session.run(
"pytest",
*COMMON_PYTEST_OPTIONS,
)