Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit 3310185

Browse files
author
staticdev
committed
Coverage session
1 parent 3fd03a0 commit 3310185

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

noxfile.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,15 @@ def tests(session: Session) -> None:
152152
@nox.session
153153
def coverage(session: Session) -> None:
154154
"""Produce the coverage report."""
155-
args = session.posargs or ["report"]
155+
# Do not use session.posargs unless this is the only session.
156+
has_args = session.posargs and len(session._runner.manifest) == 1
157+
args = session.posargs if has_args else ["report"]
158+
156159
install(session, "coverage[toml]")
157-
if not session.posargs and any(Path().glob(".coverage.*")):
160+
161+
if not has_args and any(Path().glob(".coverage.*")):
158162
session.run("coverage", "combine")
163+
159164
session.run("coverage", *args)
160165

161166

0 commit comments

Comments
 (0)