diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-04-30 19:43:50 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 07:02:44 -0400 |
commit | 27d8255458cc28dcf1b6358a5a735d1653cba35e (patch) | |
tree | 9ece66ee025251cb8ca6e8c900234ed432080c22 /coverage/inorout.py | |
parent | b1b2b8b25131dec6f563b122c63b418afe741690 (diff) | |
download | python-coveragepy-git-27d8255458cc28dcf1b6358a5a735d1653cba35e.tar.gz |
fix: don't warn that dynamic plugins already imported their source files. #1150
Diffstat (limited to 'coverage/inorout.py')
-rw-r--r-- | coverage/inorout.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py index b023db0b..532634eb 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -481,6 +481,11 @@ class InOrOut(object): continue disp = self.should_trace(filename) + if disp.has_dynamic_filename: + # A plugin with dynamic filenames: the Python file + # shouldn't cause a warning, since it won't be the subject + # of tracing anyway. + continue if disp.trace: msg = "Already imported a file that will be measured: {}".format(filename) self.warn(msg, slug="already-imported") |