summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/control.py9
-rw-r--r--coverage/files.py3
2 files changed, 5 insertions, 7 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 (
diff --git a/coverage/files.py b/coverage/files.py
index 97888b62..332c4225 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -174,10 +174,9 @@ class TreeMatcher(object):
class ModuleMatcher(object):
- """A matcher for files in a tree."""
+ """A matcher for modules in a tree."""
def __init__(self, module_names):
self.modules = list(module_names)
- self.not_imported = list(module_names)
def __repr__(self):
return "<ModuleMatcher %r>" % (self.modules)