8000 GH-91153: Add short clarifying comments to test · python/cpython@4b7ec9c · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b7ec9c

Browse files
committed
GH-91153: Add short clarifying comments to test
1 parent 18e6597 commit 4b7ec9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_bytes.py

Lines changed: 4 additions & 2 deletions
< 8D27 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,8 @@ def test_repeat_after_setslice(self):
18721872
self.assertEqual(b3, b'xcxcxc')
18731873

18741874
def test_mutating_index(self):
1875+
# bytearray slice assignment can call into python code
1876+
# that reallocates the internal buffer
18751877
# See gh-91153
18761878

18771879
class Boom:
@@ -1890,10 +1892,10 @@ def __index__(self):
18901892
self._testlimitedcapi.sequence_setitem(b, 0, Boom())
18911893

18921894
def test_mutating_index_inbounds(self):
1893-
# See gh-91153
1895+
# gh-91153 continued
1896+
# Ensure buffer is not broken even if length is correct
18941897

18951898
class MutatesOnIndex:
1896-
18971899
def __init__(self):
18981900
self.ba = bytearray(0x180)
18991901

0 commit comments

Comments
 (0)
0