-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
31 lines (29 loc) · 1.01 KB
/
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
import nox
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
@nox.parametrize("django", ["3.2", "4.2", "5.0", "5.1"])
@nox.parametrize("pyyaml", [True, False])
def tests(session, django, pyyaml):
if django in ["5.0", "5.1"] and session.python in (
"3.8",
"3.9",
):
return
session.install(f"django=={django}")
if pyyaml:
session.install("PyYAML")
if session.python in ["3.12", "3.13"]:
session.install("setuptools")
session.install("pytest~=7.4.3")
session.install("pytest-mock~=3.12.0")
session.install("pytest-django~=4.7.0")
session.install("django-webtest~=1.9.11")
session.install("-e", ".")
for testing_settings in ["min", "full", "normal"]:
for precache in (True, False):
session.run(
"pytest",
env={
"TESTING_SETTINGS": testing_settings,
**({"TESTING_PRECACHED_PY_VALUES": "1"} if precache else {}),
},
)