From 27d8255458cc28dcf1b6358a5a735d1653cba35e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 30 Apr 2021 19:43:50 -0400 Subject: fix: don't warn that dynamic plugins already imported their source files. #1150 --- coverage/inorout.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'coverage') 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") -- cgit v1.2.1