pyo3/pytests/noxfile.py

19 lines
418 B
Python
Raw Normal View History

2022-01-16 16:12:40 +00:00
import nox
2022-01-22 23:15:36 +00:00
nox.options.sessions = ["test"]
@nox.session
def test(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
session.run("pytest")
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(".")
session.run("pytest", "--benchmark-enable", "--benchmark-only", *session.posargs)