summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorBuck Golemon <buck@yelp.com>2014-11-14 17:52:52 -0800
committerBuck Golemon <buck@yelp.com>2014-11-14 17:52:52 -0800
commit5082e667fbc65db03d32138fcdfa087a6fc073a6 (patch)
tree17229105b774912609a6e15fa3e02d2bff044a47 /coverage/control.py
parentae3deed9e39b528abc2259a2fe7f7178623fce8e (diff)
downloadpython-coveragepy-git-5082e667fbc65db03d32138fcdfa087a6fc073a6.tar.gz
ned code review, part 1
--HG-- branch : __main__-support
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 1b932da3..6a136da4 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -199,7 +199,6 @@ class Coverage(object):
self.source.append(self.file_locator.canonical_filename(src))
else:
self.source_pkgs.append(src)
- self.not_imported = list(self.source_pkgs)
self.omit = prep_patterns(self.config.omit)
self.include = prep_patterns(self.config.include)
@@ -432,8 +431,8 @@ class Coverage(object):
# stdlib and coverage.py directories.
if self.source_match:
if self.source_pkgs_match.match(modulename):
- if modulename in self.not_imported:
- self.not_imported.remove(modulename)
+ if modulename in self.source_pkgs:
+ self.source_pkgs.remove(modulename)
return None # There's no reason to skip this file.
if not self.source_match.match(filename):
@@ -655,10 +654,10 @@ class Coverage(object):
self.data.add_plugin_data(self.collector.get_plugin_data())
self.collector.reset()
- # If there are still entries in the not_imported list, then we never
+ # If there are still entries in the source_pkgs list, then we never
# encountered those packages.
if self._warn_unimported_source:
- for pkg in self.not_imported:
+ for pkg in self.source_pkgs:
if pkg not in sys.modules:
self._warn("Module %s was never imported." % pkg)
elif not (