Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43ffb29

Browse files
committed
Merge remote-tracking branch 'ivanov/faster-image-comp' into faster_image_comparison_decorator
Fix for Python 2.5 compatibility.
2 parents cc644a8 + 5e50b90 commit 43ffb29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test(self):
6868
def cleanup(func):
6969
name = func.__name__
7070
func = staticmethod(func)
71-
func.__func__.__name__ = '_private'
71+
func.__get__(1).__name__ = '_private'
7272
new_class = new.classobj(
7373
name,
7474
(CleanupTest,),
@@ -166,7 +166,7 @@ def compare_images_decorator(func):
166166
# well, outside of the context of our image comparison test
167167
# generator.
168168
func = staticmethod(func)
169-
func.__func__.__name__ = '_private'
169+
func.__get__(1).__name__ = '_private'
170170
new_class = new.classobj(
171171
name,
172172
(ImageComparisonTest,),

0 commit comments

Comments
 (0)