Skip to content

Commit a04c99c

Browse files
alejsdevjpizquierdo
authored andcommitted
🔧 Update coverage configuration and simplify test script (fastapi#1867)
1 parent c8a7224 commit a04c99c

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

backend/pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,14 @@ ignore = [
6767
[tool.ruff.lint.pyupgrade]
6868
# Preserve types, even if a file imports `from __future__ import annotations`.
6969
keep-runtime-typing = true
70+
71+
[tool.coverage.run]
72+
source = ["app"]
73+
dynamic_context = "test_function"
74+
75+
[tool.coverage.report]
76+
show_missing = true
77+
sort = "-Cover"
78+
79+
[tool.coverage.html]
80+
show_contexts = true

backend/scripts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
set -e
44
set -x
55

6-
coverage run --source=app -m pytest
7-
coverage report --show-missing
6+
coverage run -m pytest
7+
coverage report
88
coverage html --title "${@-coverage}"

0 commit comments

Comments
 (0)