Kaydet (Commit) eb2c964a authored tarafından Georg Brandl's avatar Georg Brandl

Add test case for r63810.

üst 1e7217de
......@@ -832,6 +832,11 @@ class AssortedBytesTest(unittest.TestCase):
def test_rsplit_bytearray(self):
self.assertEqual(b'a b'.rsplit(memoryview(b' ')), [b'a', b'b'])
def test_return_self(self):
# bytearray.replace must always return a new bytearray
b = bytearray()
self.failIf(b.replace(b'', b'') is b)
# Optimizations:
# __iter__? (optimization)
# __reversed__? (optimization)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment