summaryrefslogtreecommitdiff
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-04-10 08:48:51 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-04-10 08:48:51 +0000
commit9f9b6152c34a106fc1d5b3d780092eb0e479f6ea (patch)
tree67940ba66de30082397fd36a3dc9fdcbfb5f9a74 /Lib/test/string_tests.py
parent7cb9a2b039c10c085879c74974422fa919136c27 (diff)
downloadcpython-9f9b6152c34a106fc1d5b3d780092eb0e479f6ea.tar.gz
Remove relics of str8 (became bytes) and buffer (bytearray) type tests
Remove redundant tests now that str is unicode.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 7d30e9e596..cd3ee48a92 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -645,14 +645,6 @@ class BaseTest:
EQ("bobobXbobob", "bobobobXbobobob", "replace", "bobob", "bob")
EQ("BOBOBOB", "BOBOBOB", "replace", "bob", "bobby")
- # XXX Commented out. Is there any reason to support buffer objects
- # as arguments for str.replace()? GvR
-## ba = bytearray('a')
-## bb = bytearray('b')
-## EQ("bbc", "abc", "replace", ba, bb)
-## EQ("aac", "abc", "replace", bb, ba)
-
- #
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)
@@ -1389,28 +1381,3 @@ class MixinStrUnicodeTest:
s1 = t("abcd")
s2 = t().join([s1])
self.assertIs(s1, s2)
-
- # Should also test mixed-type join.
- if t is str:
- s1 = subclass("abcd")
- s2 = "".join([s1])
- self.assertIsNot(s1, s2)
- self.assertIs(type(s2), t)
-
- s1 = t("abcd")
- s2 = "".join([s1])
- self.assertIs(s1, s2)
-
-## elif t is str8:
-## s1 = subclass("abcd")
-## s2 = "".join([s1])
-## self.assertIsNot(s1, s2)
-## self.assertIs(type(s2), str) # promotes!
-
-## s1 = t("abcd")
-## s2 = "".join([s1])
-## self.assertIsNot(s1, s2)
-## self.assertIs(type(s2), str) # promotes!
-
- else:
- self.fail("unexpected type for MixinStrUnicodeTest %r" % t)