Skip to content

Commit

Permalink
Update Lib/test/test_buffer.py
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Stinner <[email protected]>
  • Loading branch information
sobolevn and vstinner authored Nov 19, 2024
1 parent b7520f1 commit 99c2ed3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/test/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4441,10 +4441,11 @@ def test_issue_7385(self):

def test_bytearray_release_buffer_read_flag(self):
# See https://github.com/python/cpython/issues/126980
obj = bytearray(b'abc')
with self.assertRaises(SystemError):
bytearray().__buffer__(inspect.BufferFlags.READ)
obj.__buffer__(inspect.BufferFlags.READ)
with self.assertRaises(SystemError):
bytearray().__buffer__(inspect.BufferFlags.WRITE)
obj.__buffer__(inspect.BufferFlags.WRITE)

@support.cpython_only
def test_pybuffer_size_from_format(self):
Expand Down

0 comments on commit 99c2ed3

Please sign in to comment.