summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-09-16 17:48:02 -0400
committerNed Batchelder <ned@nedbatchelder.com>2022-09-16 18:17:55 -0400
commit7b690aa976a6bb30261d68344104f817a812a677 (patch)
treee81568929e612ee14674d7a71abf3370c6d346b1 /coverage/control.py
parent30d37e59e50b75c057a09fddf5b92869c0858949 (diff)
downloadpython-coveragepy-git-7b690aa976a6bb30261d68344104f817a812a677.tar.gz
feat: --debug=pathmap will show details of re-mapping due to [paths] setting.
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 9c4a2ac7..5e1e54bf 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -743,7 +743,10 @@ class Coverage:
aliases = None
if self.config.paths:
- aliases = PathAliases(relative=self.config.relative_files)
+ aliases = PathAliases(
+ debugfn=(self._debug.write if self._debug.should("pathmap") else None),
+ relative=self.config.relative_files,
+ )
for paths in self.config.paths.values():
result = paths[0]
for pattern in paths[1:]: