]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
⚙️ Record and show test coverage contexts (what test covers which line) (#11518)
authorSławomir Ehlert <slafs.e@gmail.com>
Fri, 16 Aug 2024 01:57:38 +0000 (03:57 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Aug 2024 01:57:38 +0000 (20:57 -0500)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
pyproject.toml
scripts/test-cov-html.sh

index dc04fcdfe1a8d53cc24ced927aa0a58ee34517ac..982ae3ed1ed0d5ffaf5d292b871372e88b2bb5e2 100644 (file)
@@ -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",
index d1bdfced2abc5ae2a62e4edd9c2fd1dc9df3a7c4..85aef9601896af5bd44188f3ef819f992b4a3cd5 100755 (executable)
@@ -6,4 +6,4 @@ set -x
 bash scripts/test.sh ${@}
 coverage combine
 coverage report --show-missing
-coverage html
+coverage html --show-contexts