summaryrefslogtreecommitdiff
path: root/coverage/plugin.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-11-21 05:51:19 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-11-21 05:51:19 -0500
commitf4b9914ab81eca5762b66446afa3fd57f84d5ec5 (patch)
treea0af3a4ef77b10af63c49bc0bd9c0686aa2fff63 /coverage/plugin.py
parentb79573db277dc80763bda8660c4e65b03f512981 (diff)
downloadpython-coveragepy-git-f4b9914ab81eca5762b66446afa3fd57f84d5ec5.tar.gz
Move to the misc.py file
Diffstat (limited to 'coverage/plugin.py')
-rw-r--r--coverage/plugin.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index 3d41aab9..1e6e2353 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -129,26 +129,3 @@ class Plugins(object):
def get(self, module):
return self.names[module]
-
-
-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 sys.version_info < (3, 0):
- klass_func = klass_func.im_func
- base_func = base_func.im_func
-
- return klass_func is not base_func