diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-08-21 10:35:15 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-08-21 10:35:15 -0400 |
commit | 6c6b73902539473740b515cea1481a924e552a66 (patch) | |
tree | 792a8eba337900c873b82f4c7ede7ae1ce8c4338 /coverage/control.py | |
parent | 17ed409f9daec331ac4c2a2ec667fa76328d42b0 (diff) | |
download | python-coveragepy-6c6b73902539473740b515cea1481a924e552a66.tar.gz |
More-serious plugin support
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/coverage/control.py b/coverage/control.py index deb4e00..6d232e5 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -135,8 +135,8 @@ class Coverage(object): self.debug = DebugControl(self.config.debug, debug_file or sys.stderr) # Load plugins - tracer_classes = load_plugins(self.config.plugins, "tracer") - self.tracer_plugins = [cls() for cls in tracer_classes] + plugins = load_plugins(self.config.plugins, self.config) + self.tracer_plugins = []#[cls() for cls in tracer_classes] self.auto_data = auto_data @@ -282,10 +282,10 @@ class Coverage(object): # Try the plugins, see if they have an opinion about the file. for tracer in self.tracer_plugins: - ext_disp = tracer.should_trace(canonical) - if ext_disp: - ext_disp.extension = tracer - return ext_disp + plugin_disp = tracer.should_trace(canonical) + if plugin_disp: + plugin_disp.plugin = tracer + return plugin_disp # If the user specified source or include, then that's authoritative # about the outer bound of what to measure and we don't have to apply |