Instruct `coverage` to record the test function for each covered line
Marco Ricci

Marco Ricci commited on 2024-12-21 01:02:34
Zeige 1 geänderte Dateien mit 1 Einfügungen und 0 Löschungen.


Enable the standard dynamic context setting `test_function` for
`coverage`.  This is immensely helpful for debugging whether and which
tests trigger or don't trigger a certain branch of code in
a multi-branch block (`if`/`elif`/`else`, `match`/`case` blocks,
dispatch tables, etc.).
... ...
@@ -91,6 +91,7 @@ parallel = true
91 91
 omit = [
92 92
   "__main__.py",
93 93
 ]
94
+dynamic_context = 'test_function'
94 95
 
95 96
 [tool.hatch.build.targets.sdist]
96 97
 exclude = [
97 98