Skip to content

Commit

Permalink
pythongh-121842: Improve coverage of PyBytes_FromStringAndSize (pyt…
Browse files Browse the repository at this point in the history
…honGH-121843)

(cherry picked from commit f6c7d8d)

Co-authored-by: sobolevn <mail@sobolevn.me>
  • Loading branch information
sobolevn authored and miss-islington committed Jul 17, 2024
1 parent a15ed56 commit 94b95a2
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 @@ -52,6 +52,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 94b95a2

Please sign in to comment.