diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2015-03-11 15:17:00 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2015-03-11 15:17:00 (GMT) |
commit | 62e977f1b6d52a973304db9b0268aece99cb6c42 (patch) | |
tree | 33a3d6ed472d37bb422f325349f6bf3de0e57049 /Lib/test/test_format.py | |
parent | 6dd20c2d52e079161ce6c8082619fafc734efa14 (diff) | |
download | cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.zip cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.gz cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.bz2 |
Close issue23467: add %r compatibility to bytes and bytearray
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r-- | Lib/test/test_format.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 9d1f5d3..e1ea33f 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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: |