mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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:
parent
30be8708c5
commit
fde66e1bcc
3 changed files with 22 additions and 4 deletions
|
@ -31,6 +31,8 @@ def test(method, input, output, *args):
|
|||
|
||||
test('capitalize', u' hello ', u' hello ')
|
||||
test('capitalize', u'hello ', u'Hello ')
|
||||
test('capitalize', u'aaaa', u'Aaaa')
|
||||
test('capitalize', u'AaAa', u'Aaaa')
|
||||
|
||||
test('count', u'aaa', 3, u'a')
|
||||
test('count', u'aaa', 0, u'b')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue