diff --git a/src/pytest_cov/plugin.py b/src/pytest_cov/plugin.py index dd7b8c4e..59af4b17 100644 --- a/src/pytest_cov/plugin.py +++ b/src/pytest_cov/plugin.py @@ -275,7 +275,8 @@ def pytest_testnodedown(self, node, error): self.cov_controller.testnodedown(node, error) def _should_report(self): - return not (self.failed and self.options.no_cov_on_fail) + needed = self.options.cov_report or self.options.cov_fail_under + return needed and not (self.failed and self.options.no_cov_on_fail) def _failed_cov_total(self): cov_fail_under = self.options.cov_fail_under