diff --git a/template/{{ project_name }}/noxfile.py.jinja b/template/{{ project_name }}/noxfile.py.jinja index 8541438..795257a 100644 --- a/template/{{ project_name }}/noxfile.py.jinja +++ b/template/{{ project_name }}/noxfile.py.jinja @@ -56,9 +56,10 @@ def run_user_tests(session): @nox.session(name="coverage") def run_coverage(session): """Run the coverage tests and generate an XML report.""" - session.posargs.append("--cov=src/{{project_slug}}") - session.posargs.append("--cov-report=xml") - run_user_tests(session) + session.install("setuptools", silent=False) + session.install("coverage", silent=False) + session.install("-e", ".[dev]", silent=False) + session.run("pytest", "--cov=src/{{project_slug}}", "--cov-report=xml", "tests/") @nox.session(name="dev") def set_dev(session):