--- a/tests/test-extensions-wrapfunction.py Tue Sep 12 09:13:02 2017 -0700
+++ b/tests/test-extensions-wrapfunction.py Sun Sep 10 23:37:14 2017 +0900
@@ -54,3 +54,11 @@
print('context manager', dummy.getstack())
print('context manager', dummy.getstack())
print('context manager', dummy.getstack())
+
+# Wrap callable object which has no __name__
+class callableobj(object):
+ def __call__(self):
+ return ['orig']
+dummy.cobj = callableobj()
+extensions.wrapfunction(dummy, 'cobj', wrappers[0])
+print('wrap callable object', dummy.cobj())