From 0aaaed581e59a95ab4ce6d18c26d6881c0782990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Ehlert?= Date: Fri, 16 Aug 2024 03:57:38 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Record=20and=20show=20test?= =?UTF-8?q?=20coverage=20contexts=20(what=20test=20covers=20which=20line)?= =?UTF-8?q?=20(#11518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastián Ramírez --- pyproject.toml | 1 + scripts/test-cov-html.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dc04fcdfe..982ae3ed1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -184,6 +184,7 @@ source = [ "fastapi" ] context = '${CONTEXT}' +dynamic_context = "test_function" omit = [ "docs_src/response_model/tutorial003_04.py", "docs_src/response_model/tutorial003_04_py310.py", diff --git a/scripts/test-cov-html.sh b/scripts/test-cov-html.sh index d1bdfced2..85aef9601 100755 --- a/scripts/test-cov-html.sh +++ b/scripts/test-cov-html.sh @@ -6,4 +6,4 @@ set -x bash scripts/test.sh ${@} coverage combine coverage report --show-missing -coverage html +coverage html --show-contexts