Skip to content

Commit dc58761

Browse files
authored
Add dynamic_context on coverage (#102)
1 parent 014f87d commit dc58761

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test:
3232
.PHONY: testcov # Run tests and generate a coverage report
3333
testcov: test
3434
@echo "building coverage html"
35-
@rye run coverage html
35+
@rye run coverage html --show-contexts
3636

3737
.PHONY: docs # Build the documentation
3838
docs:

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,7 @@ allow-direct-references = true
142142
packages = ["logfire"]
143143

144144
[tool.hatch.build.targets.sdist]
145-
include = [
146-
"/README.md",
147-
"/Makefile",
148-
"/logfire",
149-
"/tests",
150-
]
145+
include = ["/README.md", "/Makefile", "/logfire", "/tests"]
151146

152147
# https://beta.ruff.rs/docs/configuration/
153148
[tool.ruff]
@@ -221,6 +216,8 @@ DJANGO_SETTINGS_MODULE = "tests.otel_integrations.django_test_project.django_tes
221216
# https://coverage.readthedocs.io/en/latest/config.html#run
222217
[tool.coverage.run]
223218
branch = true
219+
# Use this to get the tests that are covering the code. This is disabled by default because it can be slow.
220+
# dynamic_context = "test_function"
224221

225222
# https://coverage.readthedocs.io/en/latest/config.html#report
226223
[tool.coverage.report]

0 commit comments

Comments
 (0)