@@ -645,14 +645,6 @@ def test_replace(self):
645
645
EQ ("bobobXbobob" , "bobobobXbobobob" , "replace" , "bobob" , "bob" )
646
646
EQ ("BOBOBOB" , "BOBOBOB" , "replace" , "bob" , "bobby" )
647
647
648
- # XXX Commented out. Is there any reason to support buffer objects
649
- # as arguments for str.replace()? GvR
650
- ## ba = bytearray('a')
651
- ## bb = bytearray('b')
652
- ## EQ("bbc", "abc", "replace", ba, bb)
653
- ## EQ("aac", "abc", "replace", bb, ba)
654
-
655
- #
656
648
self .checkequal ('one@two!three!' , 'one!two!three!' , 'replace' , '!' , '@' , 1 )
657
649
self .checkequal ('onetwothree' , 'one!two!three!' , 'replace' , '!' , '' )
658
650
self .checkequal ('one@two@three!' , 'one!two!three!' , 'replace' , '!' , '@' , 2 )
@@ -1389,28 +1381,3 @@ class subclass(t):
1389
1381
s1 = t ("abcd" )
1390
1382
s2 = t ().join ([s1 ])
1391
1383
self .assertIs (s1 , s2 )
1392
-
1393
- # Should also test mixed-type join.
1394
- if t is str :
1395
- s1 = subclass ("abcd" )
1396
- s2 = "" .join ([s1 ])
1397
- self .assertIsNot (s1 , s2 )
1398
- self .assertIs (type (s2 ), t )
1399
-
1400
- s1 = t ("abcd" )
1401
- s2 = "" .join ([s1 ])
1402
- self .assertIs (s1 , s2 )
1403
-
1404
- ## elif t is str8:
1405
- ## s1 = subclass("abcd")
1406
- ## s2 = "".join([s1])
1407
- ## self.assertIsNot(s1, s2)
1408
- ## self.assertIs(type(s2), str) # promotes!
1409
-
1410
- ## s1 = t("abcd")
1411
- ## s2 = "".join([s1])
1412
- ## self.assertIsNot(s1, s2)
1413
- ## self.assertIs(type(s2), str) # promotes!
1414
-
1415
- else :
1416
- self .fail ("unexpected type for MixinStrUnicodeTest %r" % t )
0 commit comments