Skip to content

Commit 5043856

Browse files
committed
Create Way to force package even if filepath exists
Fixes: #268
1 parent ebb6b39 commit 5043856

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

coverage/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def __init__(self):
195195
self.run_include = None
196196
self.run_omit = None
197197
self.source = None
198+
self.source_pkgs = []
198199
self.timid = False
199200
self._crash = None
200201

@@ -361,6 +362,7 @@ def copy(self):
361362
('run_include', 'run:include', 'list'),
362363
('run_omit', 'run:omit', 'list'),
363364
('source', 'run:source', 'list'),
365+
('source_pkgs', 'run:source_pkgs', 'list'),
364366
('timid', 'run:timid', 'boolean'),
365367
('_crash', 'run:_crash'),
366368

coverage/inorout.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def __init__(self, warn, debug):
132132

133133
def configure(self, config):
134134
"""Apply the configuration to get ready for decision-time."""
135+
self.source_pkgs.extend(config.source_pkgs)
135136
for src in config.source or []:
136137
if os.path.isdir(src):
137138
self.source.append(canonical_filename(src))

0 commit comments

Comments
 (0)