-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnoxfile.py
31 lines (23 loc) · 1.03 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
"""Nox sessions."""
from __future__ import annotations
import nox
# TODO - add "3.13" to python versions once greenlet is updated
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.parametrize("django", ["4.2"])
def tests(session: nox.Session, django: str) -> None:
"""Run the test suite."""
_run_all_tests_for_environment(session, django)
session.notify("tests_django_5")
# TODO - add "3.13" to python versions once greenlet is updated
@nox.session(python=["3.10", "3.11", "3.12"])
@nox.parametrize("django", ["5.0", "5.1a1"])
def tests_django_5(session: nox.Session, django: str) -> None:
"""Run the test suite for Django 5.0+ (Python 3.10+)."""
_run_all_tests_for_environment(session, django)
def _run_all_tests_for_environment(session: nox.Session, django: str) -> None:
session.install(f"django~={django}")
session.install("pythonbible")
session.install("factory-boy")
session.install("playwright")
session.run("playwright", "install")
session.run("python", "manage.py", "test")