Skip to content

Commit

Permalink
pythongh-121842: Improve coverage of PyBytes_FromStringAndSize
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jul 16, 2024
1 parent 8549559 commit 360b7e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/test/test_capi/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def test_fromstringandsize(self):
self.assertEqual(fromstringandsize(b'abc'), b'abc')
self.assertEqual(fromstringandsize(b'abc', 2), b'ab')
self.assertEqual(fromstringandsize(b'abc\0def'), b'abc\0def')
self.assertEqual(fromstringandsize(b'a'), b'a')
self.assertEqual(fromstringandsize(b'a', 1), b'a')
self.assertEqual(fromstringandsize(b'', 0), b'')
self.assertEqual(fromstringandsize(NULL, 0), b'')
self.assertEqual(len(fromstringandsize(NULL, 3)), 3)
Expand Down

0 comments on commit 360b7e1

Please sign in to comment.