From 80036ce3f4b82b3911e10b7d28226048dc8a56c0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 15 Feb 2015 15:06:13 -0500 Subject: Protect against misbehaving plugins. Also, test some misbehavior, and move our own annotations of plugins into prefixed attributes. --- coverage/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 17fb3df9..d5197ea3 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -165,9 +165,9 @@ def overrides(obj, method_name, base_class): # TODO: abc? def _needs_to_implement(that, func_name): """Helper to raise NotImplementedError in interface stubs.""" - if hasattr(that, "plugin_name"): + if hasattr(that, "_coverage_plugin_name"): thing = "Plugin" - name = that.plugin_name + name = that._coverage_plugin_name else: thing = "Class" klass = that.__class__ -- cgit v1.2.1