Skip to content

Commit

Permalink
[3.12] gh-121842: Improve coverage of PyBytes_FromStringAndSize (GH…
Browse files Browse the repository at this point in the history
…-121843) (#121894)

gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843)
(cherry picked from commit f6c7d8d)

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

Please sign in to comment.