diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-04-19 14:30:53 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-04-19 14:30:53 -0400 |
commit | a47db2f576108590756b8e5360bf29b6f02a9ab0 (patch) | |
tree | 196ae8dd313013e3c02238cf7c46a7c29e729eaf /test_six.py | |
parent | 4895c1c7bb958d40f645f3a9106cf22d093f004e (diff) | |
download | six-a47db2f576108590756b8e5360bf29b6f02a9ab0.tar.gz |
add create_bound_method
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 11 |
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(): |