From 2521e56aff5bd7b1f99c934800be91b02bce9e03 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 1 Sep 2020 22:55:00 +0100 Subject: [PATCH] Create Way to force package even if filepath exists Fixes: #268 --- coverage/config.py | 3 ++- coverage/inorout.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/coverage/config.py b/coverage/config.py index 84d9758bf..245e1fb8e 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -195,6 +195,7 @@ def __init__(self): self.run_include = None self.run_omit = None self.source = None + self.source_pkgs = None self.timid = False self._crash = None @@ -360,7 +361,7 @@ def copy(self): ('relative_files', 'run:relative_files', 'boolean'), ('run_include', 'run:include', 'list'), ('run_omit', 'run:omit', 'list'), - ('source', 'run:source', 'list'), + ('source_pkgs', 'run:source_pkgs', 'list'), ('timid', 'run:timid', 'boolean'), ('_crash', 'run:_crash'), diff --git a/coverage/inorout.py b/coverage/inorout.py index ec5f2c1ac..43b6863dd 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -132,6 +132,7 @@ def __init__(self, warn, debug): def configure(self, config): """Apply the configuration to get ready for decision-time.""" + self.source_pkgs.append(config.source_pkgs) for src in config.source or []: if os.path.isdir(src): self.source.append(canonical_filename(src))