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