diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-01-12 07:22:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-12 07:22:29 (GMT) |
commit | 44cc4822bb3799858201e61294c5863f93ec12e2 (patch) | |
tree | f7d25e8a7403e81d86893c8a2f7f5402297bd903 /Lib/test/test_unicode.py | |
parent | d0d3e99120b19a4b800f0f381b2807c93aeecf0e (diff) | |
download | cpython-44cc4822bb3799858201e61294c5863f93ec12e2.zip cpython-44cc4822bb3799858201e61294c5863f93ec12e2.tar.gz cpython-44cc4822bb3799858201e61294c5863f93ec12e2.tar.bz2 |
bpo-33817: Fix _PyBytes_Resize() for empty bytes object. (GH-11516)
Add also tests for PyUnicode_FromFormat() and PyBytes_FromFormat()
with empty result.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index fb7bb2d..c277e70 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -2680,6 +2680,12 @@ class CAPITest(unittest.TestCase): check_format('%.%s', b'%.%s', b'abc') + # Issue #33817: empty strings + check_format('', + b'') + check_format('', + b'%s', b'') + # Test PyUnicode_AsWideChar() @support.cpython_only def test_aswidechar(self): |