Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,15 @@ def tests(session: Session) -> None:
@nox.session
def coverage(session: Session) -> None:
"""Produce the coverage report."""
args = session.posargs or ["report"]
# Do not use session.posargs unless this is the only session.
has_args = session.posargs and len(session._runner.manifest) == 1
args = session.posargs if has_args else ["report"]

install(session, "coverage[toml]")
if not session.posargs and any(Path().glob(".coverage.*")):

if not has_args and any(Path().glob(".coverage.*")):
session.run("coverage", "combine")

session.run("coverage", *args)


Expand Down