-
-
Notifications
You must be signed in to change notification settings - Fork 301
/
noxfile.py
47 lines (39 loc) · 1.08 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import nox
@nox.session
def lint(session):
lint_tools = [
"ruff",
"mypy",
"types-setuptools",
"Flake8-pyproject",
]
targets = ["tabula", "tests", "noxfile.py"]
session.install(*lint_tools)
session.run("ruff", "format", "--check", *targets)
session.run("ruff", "check", *targets)
session.run("mypy", *targets)
@nox.session
@nox.parametrize(
"python,jpype",
[
("3.9", True),
("3.10", True),
("3.11", True),
("3.12", True),
("3.13", False),
("3.13", True),
],
)
def tests(session, jpype):
if jpype:
tests_with_jpype(session)
else:
tests_without_jpype(session)
def tests_without_jpype(session):
session.install(".[test]")
session.run("pytest", "-v", "tests/test_read_pdf_table.py")
def tests_with_jpype(session):
session.install(".[jpype,test]")
session.run("pytest", "-v", "tests/test_read_pdf_table.py")
session.run("pytest", "-v", "tests/test_read_pdf_jar_path.py")
session.run("pytest", "-v", "tests/test_read_pdf_silent.py")