summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py
index d1957ab..8fcd4d4 100644
--- a/test_six.py
+++ b/test_six.py
@@ -306,6 +306,17 @@ def test_callable():
assert not six.callable("string")
+def test_create_bound_method():
+ class X(object):
+ pass
+ def f(self):
+ return self
+ x = X()
+ b = six.create_bound_method(f, x)
+ assert isinstance(b, types.MethodType)
+ assert b() is x
+
+
if six.PY3:
def test_b():