forked from flozz/rivalcfg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
37 lines (29 loc) · 1.11 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
import nox
@nox.session
def lint(session):
session.install("flake8")
session.run("flake8", "rivalcfg", "test", "noxfile.py", "scripts")
@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
def test(session):
session.install("pytest")
session.install(".")
# Do not run doctest when using Python 2 as the output of some functions
# looks deferent from the one of Python 3 and so it cannot be matched
# properly...
# Do not run doctest on Python < 3.7 because dict are not ordered so
# the result is not predictable...
if session.python in ["2.7", "3.5", "3.6"]:
session.run("pytest", "test", env={"RIVALCFG_DRY": "1"})
else:
session.run("pytest", "--doctest-modules", "rivalcfg", "test", env={
"RIVALCFG_DRY": "1",
})
@nox.session
def gendoc(session):
session.install("sphinx", "sphinx-rtd-theme")
session.install("-e", ".")
session.run("sphinx-build", "-M", "html", "doc", "build")
@nox.session
def update_ssdb(session):
session.install("natsort")
session.run("python", "./scripts/sse3_db_update.py", "ssdb/sse3.db.csv")