summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_functional.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2005-03-11 06:48:49 (GMT)
committerRaymond Hettinger <python@rcn.com>2005-03-11 06:48:49 (GMT)
commit26e512a04f7b68684503d7afe21154b5dd392d6e (patch)
tree7bcfa4cb8165ae9fedb4f9e2b2bfbd4a2738ff3c /Lib/test/test_functional.py
parenta1a992c0a0003db10187696f6331b3200eb6f276 (diff)
downloadcpython-26e512a04f7b68684503d7afe21154b5dd392d6e.zip
cpython-26e512a04f7b68684503d7afe21154b5dd392d6e.tar.gz
cpython-26e512a04f7b68684503d7afe21154b5dd392d6e.tar.bz2
Test partial() with bound/unbound methods.
Diffstat (limited to 'Lib/test/test_functional.py')
-rw-r--r--Lib/test/test_functional.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_functional.py b/Lib/test/test_functional.py
index 8f19d6b..97e30c3 100644
--- a/Lib/test/test_functional.py
+++ b/Lib/test/test_functional.py
@@ -133,7 +133,13 @@ class TestPartial(unittest.TestCase):
f = None
self.assertRaises(ReferenceError, getattr, p, 'func')
-
+ def test_with_bound_and_unbound_methods(self):
+ data = map(str, range(10))
+ join = self.thetype(str.join, '')
+ self.assertEqual(join(data), '0123456789')
+ join = self.thetype(''.join)
+ self.assertEqual(join(data), '0123456789')
+
class PartialSubclass(functional.partial):
pass