Skip to content

Commit 96c524c

Browse files
[3.13] gh-121842: Improve coverage of PyBytes_FromStringAndSize (GH-121843) (#121893)
gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843) (cherry picked from commit f6c7d8d) Co-authored-by: sobolevn <[email protected]>
1 parent 659725c commit 96c524c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_capi/test_bytes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def test_fromstringandsize(self):
5353
self.assertEqual(fromstringandsize(b'abc'), b'abc')
5454
self.assertEqual(fromstringandsize(b'abc', 2), b'ab')
5555
self.assertEqual(fromstringandsize(b'abc\0def'), b'abc\0def')
56+
self.assertEqual(fromstringandsize(b'a'), b'a')
57+
self.assertEqual(fromstringandsize(b'a', 1), b'a')
5658
self.assertEqual(fromstringandsize(b'', 0), b'')
5759
self.assertEqual(fromstringandsize(NULL, 0), b'')
5860
self.assertEqual(len(fromstringandsize(NULL, 3)), 3)

0 commit comments

Comments
 (0)