From 5d1f651b78d2332259ab033fd539f958b0cbffcd Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 14 Oct 2024 11:22:35 -0400 Subject: [PATCH] chore: ignore coverage on return __all__ Signed-off-by: Henry Schreiner --- pyproject.toml | 3 +++ tests/test_package.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b14d93..226766a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,9 @@ testpaths = [ [tool.coverage] run.source = ["check_sdist"] +report.exclude_also = [ + "return __all__", +] [tool.mypy] diff --git a/tests/test_package.py b/tests/test_package.py index 1f8080b..391536d 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -259,5 +259,5 @@ def test_unknown_backend(): subprocess.run(["git", "add", "."], check=True) subprocess.run(["git", "commit", "-m", "Initial commit"], check=True) - with pytest.raises(ValueError, match="Unknown backend: unknown") as excinfo: + with pytest.raises(ValueError, match="Unknown backend: unknown"): compare(Path(), isolated=True, verbose=True)