diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_strop.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_strop.py b/Lib/test/test_strop.py index efc98ff..9243ff4 100644 --- a/Lib/test/test_strop.py +++ b/Lib/test/test_strop.py @@ -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 |