summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-07-05 11:07:11 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-07-05 11:07:11 -0400
commita9afb77456c4e658c25cb5f76abe611d1777cd8e (patch)
tree194c460e27b7ad7557811692c7ff5dcb26aabc99 /coverage/misc.py
parent2f829835fc65bea053c884a6b97922c07edcf1ac (diff)
downloadpython-coveragepy-git-a9afb77456c4e658c25cb5f76abe611d1777cd8e.tar.gz
Change how plugins are initialized. No more Plugin. Now coverage_init.
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/coverage/misc.py b/coverage/misc.py
index 0dad0559..21b7333c 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -158,29 +158,6 @@ class Hasher(object):
return self.md5.hexdigest()
-def overrides(obj, method_name, base_class):
- """Does `obj` override the `method_name` it got from `base_class`?
-
- Determine if `obj` implements the method called `method_name`, which it
- inherited from `base_class`.
-
- Returns a boolean.
-
- """
- klass = obj.__class__
- klass_func = getattr(klass, method_name)
- base_func = getattr(base_class, method_name)
-
- # Python 2/3 compatibility: Python 2 returns an instancemethod object, the
- # function is the .im_func attribute. Python 3 returns a plain function
- # object already.
- if env.PY2:
- klass_func = klass_func.im_func
- base_func = base_func.im_func
-
- return klass_func is not base_func
-
-
# TODO: abc?
def _needs_to_implement(that, func_name):
"""Helper to raise NotImplementedError in interface stubs."""