Fixed .capitalize() method of Unicode objects to work like the

corresponding string method. Added tests for this too.

Patch written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
This commit is contained in:
Marc-André Lemburg 2001-01-29 11:14:16 +00:00
parent 30be8708c5
commit fde66e1bcc
3 changed files with 22 additions and 4 deletions

View file

@ -53,6 +53,8 @@ def run_method_tests(test):
test('capitalize', ' hello ', ' hello ')
test('capitalize', 'hello ', 'Hello ')
test('capitalize', 'aaaa', 'Aaaa')
test('capitalize', 'AaAa', 'Aaaa')
test('count', 'aaa', 3, 'a')
test('count', 'aaa', 0, 'b')