summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/tests/test_lib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/tests/test_lib.py b/ryu/tests/test_lib.py
index 380297bf..344c30a2 100644
--- a/ryu/tests/test_lib.py
+++ b/ryu/tests/test_lib.py
@@ -267,6 +267,8 @@ def add_method(cls, method_name, method):
method.__name__ = method_name
if six.PY3:
methodtype = types.MethodType(method, cls)
+ if not hasattr(method, "__qualname__"):
+ method.__qualname__ = "%s.%s" % (cls.__qualname__, method_name)
else:
methodtype = types.MethodType(method, None, cls)
setattr(cls, method_name, methodtype)