mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Added tests of strop.replace()
This commit is contained in:
parent
f577c08683
commit
9181190c76
1 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,15 @@ test('rstrip', ' hello ', ' hello')
|
|||
test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS')
|
||||
test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def')
|
||||
|
||||
test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1)
|
||||
test('replace', 'one!two!three!', 'one@two@three!', '!', '@', 2)
|
||||
test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 3)
|
||||
test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 4)
|
||||
test('replace', 'one!two!three!', 'one@two@three@', '!', '@', 0)
|
||||
test('replace', 'one!two!three!', 'one@two@three@', '!', '@')
|
||||
test('replace', 'one!two!three!', 'one!two!three!', 'x', '@')
|
||||
test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2)
|
||||
|
||||
strop.whitespace
|
||||
strop.lowercase
|
||||
strop.uppercase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue