diff options
author | Raymond Hettinger <python@rcn.com> | 2005-03-11 06:48:49 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-03-11 06:48:49 +0000 |
commit | 0d31fea916efe87c8765ad6a6aa8dcd430c9c7af (patch) | |
tree | 8e4d0b960ea755cba8148b6da081bbaa96175a7d /Lib | |
parent | e058b5e9d2c99ff7d234253a859b78a8ba390aad (diff) | |
download | cpython-0d31fea916efe87c8765ad6a6aa8dcd430c9c7af.tar.gz |
Test partial() with bound/unbound methods.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_functional.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_functional.py b/Lib/test/test_functional.py index 8f19d6b2ae..97e30c3f8e 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 |