diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 17:57:32 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-03-01 09:14:19 -0700 |
commit | 0a5746d3c22cf296b995476bdc473a4423d7a84d (patch) | |
tree | 6848c8631390284f5e5df1e9cf38fe8205314996 /numpy/testing | |
parent | 02cfcb99bc976a0bfc39529999e2a0200fb9cc2a (diff) | |
download | numpy-0a5746d3c22cf296b995476bdc473a4423d7a84d.tar.gz |
2to3: Apply `methodattrs` fixes.
Replaces old style `f.im_func` and `f.im_class` method attributes
with `f.__func__` and `f.__class__`. Closes #3070.
Diffstat (limited to 'numpy/testing')
-rw-r--r-- | numpy/testing/noseclasses.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py index 77634deea..6df3d1cb0 100644 --- a/numpy/testing/noseclasses.py +++ b/numpy/testing/noseclasses.py @@ -48,7 +48,7 @@ class NumpyDocTestFinder(doctest.DocTestFinder): # to make by extension code writers, having this safety in place # isn't such a bad idea #print '_fm C3-1' # dbg - return module.__name__ == object.im_class.__module__ + return module.__name__ == object.__self__.__class__.__module__ elif inspect.getmodule(object) is not None: #print '_fm C4' # dbg #print 'C4 mod',module,'obj',object # dbg @@ -100,7 +100,7 @@ class NumpyDocTestFinder(doctest.DocTestFinder): if isinstance(val, staticmethod): val = getattr(obj, valname) if isinstance(val, classmethod): - val = getattr(obj, valname).im_func + val = getattr(obj, valname).__func__ # Recurse to methods, properties, and nested classes. if ((isfunction(val) or isclass(val) or |