mirror of https://github.com/python/cpython
[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 f6c7d8d79c
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
659725c6ac
commit
96c524cef6
|
@ -53,6 +53,8 @@ class CAPITest(unittest.TestCase):
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue