Skip to content

Commit

Permalink
gh-121842: Improve coverage of PyBytes_FromStringAndSize (#121843)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jul 17, 2024
1 parent 3761117 commit f6c7d8d
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 f6c7d8d

Please sign in to comment.