mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Close issue23467: add %r compatibility to bytes and bytearray
This commit is contained in:
parent
6dd20c2d52
commit
62e977f1b6
3 changed files with 14 additions and 1 deletions
|
@ -310,6 +310,11 @@ class FormatTest(unittest.TestCase):
|
|||
testcommon(b"%a", b"ghi", b"b'ghi'")
|
||||
testcommon(b"%a", "jkl", b"'jkl'")
|
||||
testcommon(b"%a", "\u0544", b"'\\u0544'")
|
||||
# %r is an alias for %a
|
||||
testcommon(b"%r", 3.14, b"3.14")
|
||||
testcommon(b"%r", b"ghi", b"b'ghi'")
|
||||
testcommon(b"%r", "jkl", b"'jkl'")
|
||||
testcommon(b"%r", "\u0544", b"'\\u0544'")
|
||||
|
||||
# Test exception for unknown format characters, etc.
|
||||
if verbose:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue