diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-05-24 20:27:18 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-05-24 20:27:18 (GMT) |
commit | beaec0c3a18bb38a3d35e3a2abfc5bfeae63485d (patch) | |
tree | ed76a7373683446c45e17b31bb9db82d0e8232e8 /Lib/test/string_tests.py | |
parent | e5488ec01e38e7edfb27ebddd410ec55a3120777 (diff) | |
download | cpython-beaec0c3a18bb38a3d35e3a2abfc5bfeae63485d.zip cpython-beaec0c3a18bb38a3d35e3a2abfc5bfeae63485d.tar.gz cpython-beaec0c3a18bb38a3d35e3a2abfc5bfeae63485d.tar.bz2 |
We can't leave the checked-in tests broken.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r-- | Lib/test/string_tests.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 473a2e7..e363e3f 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) |