mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Add test case for r63810.
This commit is contained in:
parent
1e7217de49
commit
eb2c964aeb
1 changed files with 5 additions and 0 deletions
|
@ -832,6 +832,11 @@ class AssortedBytesTest(unittest.TestCase):
|
||||||
def test_rsplit_bytearray(self):
|
def test_rsplit_bytearray(self):
|
||||||
self.assertEqual(b'a b'.rsplit(memoryview(b' ')), [b'a', b'b'])
|
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:
|
# Optimizations:
|
||||||
# __iter__? (optimization)
|
# __iter__? (optimization)
|
||||||
# __reversed__? (optimization)
|
# __reversed__? (optimization)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue