-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnoxfile.py
More file actions
34 lines (27 loc) · 764 Bytes
/
noxfile.py
File metadata and controls
34 lines (27 loc) · 764 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
33
34
import nox
PYTHON_FILES = [
"imagequant",
"setup.py",
"noxfile.py",
]
@nox.session(reuse_venv=True)
def lint(session):
session.install("flake8", "black")
session.run("flake8", *PYTHON_FILES)
session.run(
"black",
"--check",
"--diff",
"--color",
*PYTHON_FILES,
)
@nox.session(reuse_venv=True)
def black_fix(session):
session.install("black")
session.run("black", *PYTHON_FILES)
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"], reuse_venv=True)
def test(session):
session.install("setuptools", "pytest")
session.install(".[pil]")
session.run("python", "./imagequant/libimagequant_build.py")
session.run("pytest", "-v", "--doctest-modules", "imagequant")