From 70ba38090b47d4dc0bd88fa39b6b1a5424d4793d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 11 Apr 2021 17:16:09 -0400 Subject: fix: restore metacov functioning The check for coverage files inside the --source check disables our metacoverage. Removing it means that coverage files will still not be measured, but the reason will be given as "is third-party" rather than "is part of coverage.py," which is a small price to pay. --- coverage/inorout.py | 2 -- tests/test_process.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/coverage/inorout.py b/coverage/inorout.py index 93dbef0e..b023db0b 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -429,8 +429,6 @@ class InOrOut(object): ok = True if not ok: return extra + "falls outside the --source spec" - if self.cover_match.match(filename): - return "inside --source, but is part of coverage.py" if not self.source_in_third: if self.third_match.match(filename): return "inside --source, but is third-party" diff --git a/tests/test_process.py b/tests/test_process.py index ef3bbedc..2447cffe 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -1749,7 +1749,7 @@ class VirtualenvTest(CoverageTest): debug_out = self.get_trace_output() assert re_lines( debug_out, - r"^Not tracing .*\bexecfile.py': inside --source, but is part of coverage.py" + r"^Not tracing .*\bexecfile.py': inside --source, but is third-party" ) assert re_lines(debug_out, r"^Tracing .*\bmyproduct.py") assert re_lines( -- cgit v1.2.1