summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-11 08:37:36 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-11 08:37:36 -0400
commitb11386bb29632e5991c5777cabf5509f1d13b7e1 (patch)
tree56434b86526da39064d98b6dc18924cecfccc121
parentf06b950c318bcd9cf8bc8ec3a03fb4d0d518b8d9 (diff)
downloadpython-coveragepy-git-nedbat/5.5x.tar.gz
debug: add more tracingnedbat/5.5x
This helps us diagnose problems where 5.5 worked and 6.x doesn't.
-rw-r--r--coverage/inorout.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py
index fbd1a95e..42a40586 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -389,6 +389,12 @@ class InOrOut(object):
msg = "Already imported a file that will be measured: {}".format(filename)
self.warn(msg, slug="already-imported")
warned.add(filename)
+ elif self.debug and self.debug.should('trace'):
+ self.debug.write(
+ "Didn't trace already imported file {!r}: {}".format(
+ disp.original_filename, disp.reason
+ )
+ )
def warn_unimported_source(self):
"""Warn about source packages that were of interest, but never traced."""