diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-21 09:30:58 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-21 09:30:58 -0500 |
commit | 07bea81b78a72af05cf9df2518ac99542ef19036 (patch) | |
tree | d5f510ef9d586f356189c7e9c1f2e1ebffb4fd23 /coverage/control.py | |
parent | 4f1124c2689175fe39a0ccc1a828cad8cfae9f5a (diff) | |
download | python-coveragepy-git-07bea81b78a72af05cf9df2518ac99542ef19036.tar.gz |
Disable plugins if we can't support them, and show that in debug output.
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/coverage/control.py b/coverage/control.py index 08807862..cb85da19 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -243,7 +243,7 @@ class Coverage(object): # Early warning if we aren't going to be able to support plugins. if self.file_tracers and not self.collector.supports_plugins: - raise CoverageException( + self._warn( "Plugin file tracers (%s) aren't supported with %s" % ( ", ".join( ft._coverage_plugin_name for ft in self.file_tracers @@ -251,6 +251,8 @@ class Coverage(object): self.collector.tracer_name(), ) ) + for plugin in self.file_tracers: + plugin._coverage_enabled = False # Suffixes are a bit tricky. We want to use the data suffix only when # collecting data, not when combining data. So we save it as @@ -1009,15 +1011,20 @@ class Coverage(object): except AttributeError: implementation = "unknown" + file_tracers = [] + for ft in self.file_tracers: + ft_name = ft._coverage_plugin_name + if not ft._coverage_enabled: + ft_name += " (disabled)" + file_tracers.append(ft_name) + info = [ ('version', covmod.__version__), ('coverage', covmod.__file__), ('cover_dir', self.cover_dir), ('pylib_dirs', self.pylib_dirs), ('tracer', self.collector.tracer_name()), - ('file_tracers', [ - ft._coverage_plugin_name for ft in self.file_tracers - ]), + ('file_tracers', file_tracers), ('config_files', self.config.attempted_config_files), ('configs_read', self.config.config_files), ('data_path', self.data.filename), |