diff options
author | Bart van Merrienboer <bart.vanmerrienboer@gmail.com> | 2015-01-21 12:51:23 -0500 |
---|---|---|
committer | Bart van Merrienboer <bart.vanmerrienboer@gmail.com> | 2015-01-21 12:51:23 -0500 |
commit | c7909fab088b97ced9ea153e6b9d324c9e3a9c43 (patch) | |
tree | a1432d1ea8f8052941d59d49f62d172b01be0618 /test_six.py | |
parent | 69bf037556cde9a1c0f0cf94bac9517a4af68a0f (diff) | |
download | six-git-c7909fab088b97ced9ea153e6b9d324c9e3a9c43.tar.gz |
Added tests
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index 76a8ccb..73a1f41 100644 --- a/test_six.py +++ b/test_six.py @@ -456,6 +456,20 @@ def test_create_bound_method(): assert b() is x +def test_create_unbound_method(): + class X(object): + pass + + def f(self): + return self + u = six.create_unbound_method(f, X) + py.test.raises(TypeError, u) + if six.PY2: + assert isinstance(u, types.MethodType) + x = X() + assert f(x) is x + + if six.PY3: def test_b(): |