diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-08-11 18:52:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-08-11 18:52:27 -0400 |
commit | 48660ffdcad828ba21da711a07af9ab19e106276 (patch) | |
tree | 5d2a1e1457e839d6c8b65da34e4a35675bbdee6a | |
parent | a005ce15e11ad66e384b5eed095812db04bc9420 (diff) | |
download | python-coveragepy-git-48660ffdcad828ba21da711a07af9ab19e106276.tar.gz |
debug=plugin didn't handle all plugin methods. #834
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | coverage/plugin_support.py | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index f2c017f2..34a75634 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,7 +30,11 @@ Unreleased - Fixed an unusual tokenizing issue with backslashes in comments. Fixes `issue 822`_. +- `debug=plugin` didn't properly support configuration or dynamic context + plugins, but now it does, closing `issue 834`_. + .. _issue 822: https://github.com/nedbat/coveragepy/issues/822 +.. _issue 834: https://github.com/nedbat/coveragepy/issues/834 .. _issue 829: https://github.com/nedbat/coveragepy/issues/829 diff --git a/coverage/plugin_support.py b/coverage/plugin_support.py index 7c25a5f1..89c1c765 100644 --- a/coverage/plugin_support.py +++ b/coverage/plugin_support.py @@ -167,6 +167,20 @@ class DebugPluginWrapper(CoveragePlugin): reporter = DebugFileReporterWrapper(filename, reporter, debug) return reporter + def dynamic_context(self, frame): + context = self.plugin.dynamic_context(frame) + self.debug.write("dynamic_context(%r) --> %r" % (frame, context)) + return context + + def find_executable_files(self, src_dir): + executable_files = self.plugin.find_executable_files(src_dir) + self.debug.write("find_executable_files(%r) --> %r" % (src_dir, executable_files)) + return executable_files + + def configure(self, config): + self.debug.write("configure(%r)" % (config,)) + self.plugin.configure(config) + def sys_info(self): return self.plugin.sys_info() |