2022-01-16 16:12:40 +00:00
|
|
|
import nox
|
2022-09-18 18:09:23 +00:00
|
|
|
import platform
|
2022-01-16 16:12:40 +00:00
|
|
|
|
2022-01-22 23:15:36 +00:00
|
|
|
nox.options.sessions = ["test"]
|
|
|
|
|
|
|
|
|
|
|
|
@nox.session
|
|
|
|
def test(session):
|
|
|
|
session.install("-rrequirements-dev.txt")
|
2022-09-18 18:09:23 +00:00
|
|
|
if platform.system() == "Linux" and platform.python_implementation() == "CPython":
|
|
|
|
session.install("numpy>=1.16")
|
2022-01-22 23:15:36 +00:00
|
|
|
session.install("maturin")
|
|
|
|
session.run_always("maturin", "develop")
|
2022-10-25 06:23:21 +00:00
|
|
|
session.run("pytest", *session.posargs)
|
2022-01-22 23:15:36 +00:00
|
|
|
|
2022-01-16 16:12:40 +00:00
|
|
|
|
|
|
|
@nox.session
|
2022-01-22 23:15:36 +00:00
|
|
|
def bench(session):
|
2022-01-16 16:12:40 +00:00
|
|
|
session.install("-rrequirements-dev.txt")
|
2022-01-22 23:15:36 +00:00
|
|
|
session.install(".")
|
2022-02-05 09:39:56 +00:00
|
|
|
session.run("pytest", "--benchmark-enable", "--benchmark-only", *session.posargs)
|