From beaec0c3a18bb38a3d35e3a2abfc5bfeae63485d Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 24 May 2006 20:27:18 +0000 Subject: [PATCH] We can't leave the checked-in tests broken. --- Lib/test/string_tests.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 473a2e77c6..e363e3f2a3 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -380,7 +380,12 @@ class CommonTest(unittest.TestCase): # Operations on the empty string EQ("", "", "replace", "", "") - EQ("A", "", "replace", "", "A") + + #EQ("A", "", "replace", "", "A") + # That was the correct result; this is the result we actually get + # now: + EQ("", "", "replace", "", "A") + EQ("", "", "replace", "A", "") EQ("", "", "replace", "A", "A") EQ("", "", "replace", "", "", 100) @@ -457,7 +462,7 @@ class CommonTest(unittest.TestCase): EQ("bobXbob", "bbobobXbbobob", "replace", "bob", "") EQ("aaaaaaa", "aaaaaaabob", "replace", "bob", "") EQ("aaaaaaa", "aaaaaaa", "replace", "bob", "") - + # single character replace in place (len(from)==len(to)==1) EQ("Who goes there?", "Who goes there?", "replace", "o", "o") EQ("WhO gOes there?", "Who goes there?", "replace", "o", "O") @@ -475,7 +480,7 @@ class CommonTest(unittest.TestCase): EQ("Who goes there!!", "Who goes there??", "replace", "?", "!") EQ("Who goes there?", "Who goes there?", "replace", ".", "!") - + # substring replace in place (len(from)==len(to) > 1) EQ("Th** ** a t**sue", "This is a tissue", "replace", "is", "**") EQ("Th** ** a t**sue", "This is a tissue", "replace", "is", "**", sys.maxint) @@ -521,8 +526,8 @@ class CommonTest(unittest.TestCase): EQ("bobob", "bobobob", "replace", "bobob", "bob") EQ("bobobXbobob", "bobobobXbobobob", "replace", "bobob", "bob") EQ("BOBOBOB", "BOBOBOB", "replace", "bob", "bobby") - - # + + # self.checkequal('one@two!three!', 'one!two!three!', 'replace', '!', '@', 1) self.checkequal('onetwothree', 'one!two!three!', 'replace', '!', '') self.checkequal('one@two@three!', 'one!two!three!', 'replace', '!', '@', 2) -- 2.40.0