Allow passing through arguments to pytest

Can enable running individual tests or supllying any other arguments.
Will remove the default argument `--cov`.
This commit is contained in:
Marty Oehme 2021-12-15 15:53:13 +01:00
parent abd48e0ee8
commit 851b14591f
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import nox
@nox.session(python=["3.7", "3.8", "3.9"])
def tests(session):
args = session.posargs or ["--cov"]
session.run("poetry", "install", external=True)
session.run("pytest", "--cov")
session.run("pytest", *args)
pass

View File

@ -15,7 +15,6 @@ click = "^8.0"
[tool.poetry.dev-dependencies]
pytest = "^6.2"
coverage = {extras = ["toml"], version = "^6.2"}
pytest-cov = "^3.0.0"
pytest-mock = "^3.6.1"