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

Commit aa0bc66

Browse files
author
staticdev
committed
Remove pytest-cov
1 parent 426082e commit aa0bc66

3 files changed

Lines changed: 16 additions & 26 deletions

File tree

noxfile.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,20 @@ def mypy(session: Session) -> None:
137137
@nox.session(python=python_versions)
138138
def tests(session: Session) -> None:
139139
"""Run the test suite."""
140-
args = session.posargs or ["--cov"]
141140
install_package(session)
142-
install(session, "coverage[toml]", "pytest", "pytest-cov", "pytest_mock")
143-
session.run("pytest", *args)
141+
install(session, "coverage[toml]", "pytest", "pytest_mock")
142+
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
143+
session.notify("coverage")
144+
145+
146+
@nox.session
147+
def coverage(session: Session) -> None:
148+
"""Produce the coverage report."""
149+
args = session.posargs or ["report"]
150+
install(session, "coverage[toml]")
151+
if not session.posargs and any(Path().glob(".coverage.*")):
152+
session.run("coverage", "combine")
153+
session.run("coverage", *args)
144154

145155

146156
@nox.session(python=python_versions)

poetry.lock

Lines changed: 3 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ importlib_metadata = {version = "^1.6.0", python = "<3.8"}
1717
[tool.poetry.dev-dependencies]
1818
pytest = "^5.4.2"
1919
coverage = {extras = ["toml"], version = "^5.0.3"}
20-
pytest-cov = "^2.8.1"
2120
black = "^19.10b0"
2221
flake8 = "^3.8.1"
2322
flake8-bandit = "^2.1.2"

0 commit comments

Comments
 (0)