diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 20:50:36 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 20:50:36 (GMT) |
commit | 0cdad1e2bc8794cdbba8a89e2a4177a7dedec313 (patch) | |
tree | 266a4271792dc69aa5ab9e5194f4e10cd06225e1 /Lib/test/test_format.py | |
parent | be75b8cf2310e0be0f32590a1c0df919058002e8 (diff) | |
download | cpython-0cdad1e2bc8794cdbba8a89e2a4177a7dedec313.zip cpython-0cdad1e2bc8794cdbba8a89e2a4177a7dedec313.tar.gz cpython-0cdad1e2bc8794cdbba8a89e2a4177a7dedec313.tar.bz2 |
Issue #25349: Add fast path for b'%c' % int
Optimize also %% formater.
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r-- | Lib/test/test_format.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 9b13632..9924fde 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -300,6 +300,8 @@ class FormatTest(unittest.TestCase): testcommon(b"%c", 7, b"\x07") testcommon(b"%c", b"Z", b"Z") testcommon(b"%c", bytearray(b"Z"), b"Z") + testcommon(b"%5c", 65, b" A") + testcommon(b"%-5c", 65, b"A ") # %b will insert a series of bytes, either from a type that supports # the Py_buffer protocol, or something that has a __bytes__ method class FakeBytes(object): |