From 2018ed58af1b6d2fffb1daede0c9e54ae5ad82f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 18 Aug 2024 13:05:31 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20coverage=20configs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- pyproject.toml | 6 ++++++ scripts/test-cov-html.sh | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22fc0b7d..53f3e277 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,7 +99,7 @@ jobs: - run: ls -la coverage - run: coverage combine coverage - run: coverage report - - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}" + - run: coverage html --title "Coverage for ${{ github.sha }}" - name: Store coverage HTML uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 3f319e2b..af342f04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,11 +84,14 @@ source = [ "tests", ] context = '${CONTEXT}' +dynamic_context = "test_function" omit = [ "tests/assets/*", ] [tool.coverage.report] +show_missing = true +sort = "-Cover" exclude_lines = [ "pragma: no cover", "@overload", @@ -96,6 +99,9 @@ exclude_lines = [ "if TYPE_CHECKING:", ] +[tool.coverage.html] +show_contexts = true + [tool.mypy] strict = true exclude = [ diff --git a/scripts/test-cov-html.sh b/scripts/test-cov-html.sh index d1bdfced..517ac642 100755 --- a/scripts/test-cov-html.sh +++ b/scripts/test-cov-html.sh @@ -5,5 +5,5 @@ set -x bash scripts/test.sh ${@} coverage combine -coverage report --show-missing +coverage report coverage html