Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

lib-python/3/test/test_format.py::unmodified

== PyPy 3.12.13 (a3c6b428e7a8, Jul 09 2026, 03:54:00) [PyPy 8.0.0-alpha0 with GCC Apple LLVM 16.0.0 (clang-1600.0.26.6)]
== macOS-15.7.7-arm64-arm-64bit little-endian
== Python build: release with_assert
== cwd: /private/tmp/buildbot-arm64/pytest/test_python_worker_55335æ
== CPU count: 8
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 1961021333
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 5.38 Run 1 test sequentially in a single process
0:00:00 load avg: 5.38 [1/1] test_format
test_better_error_message_format (test.test_format.FormatTest.test_better_error_message_format) ... ok
test_bytes_and_bytearray_format (test.test_format.FormatTest.test_bytes_and_bytearray_format) ... b'%c' % (7,) =? b'\x07' ... yes
bytearray(b'%c') % (7,) =? bytearray(b'\x07') ... yes
b'%c' % (b'Z',) =? b'Z' ... yes
bytearray(b'%c') % (b'Z',) =? bytearray(b'Z') ... yes
b'%c' % (bytearray(b'Z'),) =? b'Z' ... yes
bytearray(b'%c') % (bytearray(b'Z'),) =? bytearray(b'Z') ... yes
b'%5c' % (65,) =? b'    A' ... yes
bytearray(b'%5c') % (65,) =? bytearray(b'    A') ... yes
b'%-5c' % (65,) =? b'A    ' ... yes
bytearray(b'%-5c') % (65,) =? bytearray(b'A    ') ... yes
b'%b' % (b'abc',) =? b'abc' ... yes
bytearray(b'%b') % (b'abc',) =? bytearray(b'abc') ... yes
b'%b' % (bytearray(b'def'),) =? b'def' ... yes
bytearray(b'%b') % (bytearray(b'def'),) =? bytearray(b'def') ... yes
b'%b' % (<test.test_format.FormatTest.test_bytes_and_bytearray_format.<locals>.FakeBytes object at 0x000000014062e170>,) =? b'123' ... yes
bytearray(b'%b') % (<test.test_format.FormatTest.test_bytes_and_bytearray_format.<locals>.FakeBytes object at 0x000000014062e170>,) =? bytearray(b'123') ... yes
b'%b' % (<memory at 0x00000001307c1e80>,) =? b'abc' ... yes
bytearray(b'%b') % (<memory at 0x00000001307c1e80>,) =? bytearray(b'abc') ... yes
b'%s' % (b'abc',) =? b'abc' ... yes
bytearray(b'%s') % (b'abc',) =? bytearray(b'abc') ... yes
b'%s' % (bytearray(b'def'),) =? b'def' ... yes
bytearray(b'%s') % (bytearray(b'def'),) =? bytearray(b'def') ... yes
b'%s' % (<test.test_format.FormatTest.test_bytes_and_bytearray_format.<locals>.FakeBytes object at 0x000000014062e170>,) =? b'123' ... yes
bytearray(b'%s') % (<test.test_format.FormatTest.test_bytes_and_bytearray_format.<locals>.FakeBytes object at 0x000000014062e170>,) =? bytearray(b'123') ... yes
b'%s' % (<memory at 0x00000001307da290>,) =? b'abc' ... yes
bytearray(b'%s') % (<memory at 0x00000001307da290>,) =? bytearray(b'abc') ... yes
b'%a' % (3.14,) =? b'3.14' ... yes
bytearray(b'%a') % (3.14,) =? bytearray(b'3.14') ... yes
b'%a' % (b'ghi',) =? b"b'ghi'" ... yes
bytearray(b'%a') % (b'ghi',) =? bytearray(b"b\'ghi\'") ... yes
b'%a' % ('jkl',) =? b"'jkl'" ... yes
bytearray(b'%a') % ('jkl',) =? bytearray(b"\'jkl\'") ... yes
b'%a' % ('\u0544',) =? b"'\\u0544'" ... yes
bytearray(b'%a') % ('\u0544',) =? bytearray(b"\'\\u0544\'") ... yes
b'%r' % (3.14,) =? b'3.14' ... yes
bytearray(b'%r') % (3.14,) =? bytearray(b'3.14') ... yes
b'%r' % (b'ghi',) =? b"b'ghi'" ... yes
bytearray(b'%r') % (b'ghi',) =? bytearray(b"b\'ghi\'") ... yes
b'%r' % ('jkl',) =? b"'jkl'" ... yes
bytearray(b'%r') % ('jkl',) =? bytearray(b"\'jkl\'") ... yes
b'%r' % ('\u0544',) =? b"'\\u0544'" ... yes
bytearray(b'%r') % ('\u0544',) =? bytearray(b"\'\\u0544\'") ... yes
Testing exceptions
b'%g' % '1' works? ... no
Unexpected  <class 'TypeError'> : 'must be real number, not str'
b'%g' % b'1' works? ... no
Unexpected  <class 'TypeError'> : 'must be real number, not bytes'
b'no format' % 7 works? ... no
Unexpected  <class 'TypeError'> : 'not all arguments converted during string formatting'
b'no format' % b'1' works? ... no
Unexpected  <class 'TypeError'> : 'not all arguments converted during string formatting'
b'no format' % bytearray(b'1') works? ... no
Unexpected  <class 'TypeError'> : 'not all arguments converted during string formatting'
b'%c' % -1 works? ... no
Unexpected  <class 'OverflowError'> : 'character code not in range(256)'
b'%c' % 256 works? ... no
Unexpected  <class 'OverflowError'> : 'character code not in range(256)'
b'%c' % 340282366920938463463374607431768211456 works? ... no
Unexpected  <class 'OverflowError'> : 'int too large to convert to int'
b'%c' % b'Za' works? ... no
Unexpected  <class 'TypeError'> : '%c requires int or single byte'
b'%c' % 'Y' works? ... no
Unexpected  <class 'TypeError'> : '%c requires int or single byte'
b'%c' % 3.14 works? ... no
Unexpected  <class 'TypeError'> : '%c requires int or single byte'
b'%b' % 'Xc' works? ... no
Unexpected  <class 'TypeError'> : "requires bytes, or an object that implements __bytes__, not 'str'"
b'%s' % 'Wd' works? ... no
Unexpected  <class 'TypeError'> : "requires bytes, or an object that implements __bytes__, not 'str'"
ok
test_common_format (test.test_format.FormatTest.test_common_format) ... '%%' % () =? '%' ... yes
b'%%' % () =? b'%' ... yes
bytearray(b'%%') % () =? bytearray(b'%') ... yes
'%.1d' % (1,) =? '1' ... yes
b'%.1d' % (1,) =? b'1' ... yes
bytearray(b'%.1d') % (1,) =? bytearray(b'1') ... yes
'%.*d' % (9223372036854775807, 1) works? ... overflow (this is fine)
b'%.*d' % (9223372036854775807, 1) works? ... overflow (this is fine)
bytearray(b'%.*d') % (9223372036854775807, 1) works? ... overflow (this is fine)
'%.100d' % (1,) =? '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
b'%.100d' % (1,) =? b'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
bytearray(b'%.100d') % (1,) =? bytearray(b'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001') ... yes
'%#.117x' % (1,) =? '0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
b'%#.117x' % (1,) =? b'0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
bytearray(b'%#.117x') % (1,) =? bytearray(b'0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001') ... yes
'%#.118x' % (1,) =? '0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
b'%#.118x' % (1,) =? b'0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001' ... yes
bytearray(b'%#.118x') % (1,) =? bytearray(b'0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001') ... yes
'%f' % (1.0,) =? '1.000000' ... yes
b'%f' % (1.0,) =? b'1.000000' ... yes
bytearray(b'%f') % (1.0,) =? bytearray(b'1.000000') ... yes
'%#.*g' % (109, -3.3333333333333334e+48) works? ... yes
b'%#.*g' % (109, -3.3333333333333334e+48) works? ... yes
bytearray(b'%#.*g') % (109, -3.3333333333333334e+48) works? ... yes
'%#.*g' % (110, -3.3333333333333334e+48) works? ... yes
b'%#.*g' % (110, -3.3333333333333334e+48) works? ... yes
bytearray(b'%#.*g') % (110, -3.3333333333333334e+48) works? ... yes
'%#.*g' % (110, -3.333333333333333e+99) works? ... yes
b'%#.*g' % (110, -3.333333333333333e+99) works? ... yes
bytearray(b'%#.*g') % (110, -3.333333333333333e+99) works? ... yes
'%12.*f' % (123456, 1.0) works? ... yes
b'%12.*f' % (123456, 1.0) works? ... yes
bytearray(b'%12.*f') % (123456, 1.0) works? ... yes
'%#.*g' % (110, -3.333333333333333e+99) works? ... yes
b'%#.*g' % (110, -3.333333333333333e+99) works? ... yes
bytearray(b'%#.*g') % (110, -3.333333333333333e+99) works? ... yes
'%#.*G' % (110, -3.333333333333333e+99) works? ... yes
b'%#.*G' % (110, -3.333333333333333e+99) works? ... yes
bytearray(b'%#.*G') % (110, -3.333333333333333e+99) works? ... yes
'%#.*f' % (110, -3.333333333333333e+99) works? ... yes
b'%#.*f' % (110, -3.333333333333333e+99) works? ... yes
bytearray(b'%#.*f') % (110, -3.333333333333333e+99) works? ... yes
'%#.*F' % (110, -3.333333333333333e+99) works? ... yes
b'%#.*F' % (110, -3.333333333333333e+99) works? ... yes
bytearray(b'%#.*F') % (110, -3.333333333333333e+99) works? ... yes
'%x' % 10 =? 'a' ... yes
b'%x' % (10,) =? b'a' ... yes
bytearray(b'%x') % (10,) =? bytearray(b'a') ... yes
'%x' % 100000000000 =? '174876e800' ... yes
b'%x' % (100000000000,) =? b'174876e800' ... yes
bytearray(b'%x') % (100000000000,) =? bytearray(b'174876e800') ... yes
'%o' % 10 =? '12' ... yes
b'%o' % (10,) =? b'12' ... yes
bytearray(b'%o') % (10,) =? bytearray(b'12') ... yes
'%o' % 100000000000 =? '1351035564000' ... yes
b'%o' % (100000000000,) =? b'1351035564000' ... yes
bytearray(b'%o') % (100000000000,) =? bytearray(b'1351035564000') ... yes
'%d' % 10 =? '10' ... yes
b'%d' % (10,) =? b'10' ... yes
bytearray(b'%d') % (10,) =? bytearray(b'10') ... yes
'%d' % 100000000000 =? '100000000000' ... yes
b'%d' % (100000000000,) =? b'100000000000' ... yes
bytearray(b'%d') % (100000000000,) =? bytearray(b'100000000000') ... yes
'%d' % 123456789012345678901234567890 =? '123456789012345678901234567890' ... yes
b'%d' % (123456789012345678901234567890,) =? b'123456789012345678901234567890' ... yes
bytearray(b'%d') % (123456789012345678901234567890,) =? bytearray(b'123456789012345678901234567890') ... yes
'%d' % -123456789012345678901234567890 =? '-123456789012345678901234567890' ... yes
b'%d' % (-123456789012345678901234567890,) =? b'-123456789012345678901234567890' ... yes
bytearray(b'%d') % (-123456789012345678901234567890,) =? bytearray(b'-123456789012345678901234567890') ... yes
'%5d' % -123456789012345678901234567890 =? '-123456789012345678901234567890' ... yes
b'%5d' % (-123456789012345678901234567890,) =? b'-123456789012345678901234567890' ... yes
bytearray(b'%5d') % (-123456789012345678901234567890,) =? bytearray(b'-123456789012345678901234567890') ... yes
'%31d' % -123456789012345678901234567890 =? '-123456789012345678901234567890' ... yes
b'%31d' % (-123456789012345678901234567890,) =? b'-123456789012345678901234567890' ... yes
bytearray(b'%31d') % (-123456789012345678901234567890,) =? bytearray(b'-123456789012345678901234567890') ... yes
'%32d' % -123456789012345678901234567890 =? ' -123456789012345678901234567890' ... yes
b'%32d' % (-123456789012345678901234567890,) =? b' -123456789012345678901234567890' ... yes
bytearray(b'%32d') % (-123456789012345678901234567890,) =? bytearray(b' -123456789012345678901234567890') ... yes
'%-32d' % -123456789012345678901234567890 =? '-123456789012345678901234567890 ' ... yes
b'%-32d' % (-123456789012345678901234567890,) =? b'-123456789012345678901234567890 ' ... yes
bytearray(b'%-32d') % (-123456789012345678901234567890,) =? bytearray(b'-123456789012345678901234567890 ') ... yes
'%032d' % -123456789012345678901234567890 =? '-0123456789012345678901234567890' ... yes
b'%032d' % (-123456789012345678901234567890,) =? b'-0123456789012345678901234567890' ... yes
bytearray(b'%032d') % (-123456789012345678901234567890,) =? bytearray(b'-0123456789012345678901234567890') ... yes
'%-032d' % -123456789012345678901234567890 =? '-123456789012345678901234567890 ' ... yes
b'%-032d' % (-123456789012345678901234567890,) =? b'-123456789012345678901234567890 ' ... yes
bytearray(b'%-032d') % (-123456789012345678901234567890,) =? bytearray(b'-123456789012345678901234567890 ') ... yes
'%034d' % -123456789012345678901234567890 =? '-000123456789012345678901234567890' ... yes
b'%034d' % (-123456789012345678901234567890,) =? b'-000123456789012345678901234567890' ... yes
bytearray(b'%034d') % (-123456789012345678901234567890,) =? bytearray(b'-000123456789012345678901234567890') ... yes
'%034d' % 123456789012345678901234567890 =? '0000123456789012345678901234567890' ... yes
b'%034d' % (123456789012345678901234567890,) =? b'0000123456789012345678901234567890' ... yes
bytearray(b'%034d') % (123456789012345678901234567890,) =? bytearray(b'0000123456789012345678901234567890') ... yes
'%0+34d' % 123456789012345678901234567890 =? '+000123456789012345678901234567890' ... yes
b'%0+34d' % (123456789012345678901234567890,) =? b'+000123456789012345678901234567890' ... yes
bytearray(b'%0+34d') % (123456789012345678901234567890,) =? bytearray(b'+000123456789012345678901234567890') ... yes
'%+34d' % 123456789012345678901234567890 =? '   +123456789012345678901234567890' ... yes
b'%+34d' % (123456789012345678901234567890,) =? b'   +123456789012345678901234567890' ... yes
bytearray(b'%+34d') % (123456789012345678901234567890,) =? bytearray(b'   +123456789012345678901234567890') ... yes
'%34d' % 123456789012345678901234567890 =? '    123456789012345678901234567890' ... yes
b'%34d' % (123456789012345678901234567890,) =? b'    123456789012345678901234567890' ... yes
bytearray(b'%34d') % (123456789012345678901234567890,) =? bytearray(b'    123456789012345678901234567890') ... yes
'%.2d' % 123456789012345678901234567890 =? '123456789012345678901234567890' ... yes
b'%.2d' % (123456789012345678901234567890,) =? b'123456789012345678901234567890' ... yes
bytearray(b'%.2d') % (123456789012345678901234567890,) =? bytearray(b'123456789012345678901234567890') ... yes
'%.30d' % 123456789012345678901234567890 =? '123456789012345678901234567890' ... yes
b'%.30d' % (123456789012345678901234567890,) =? b'123456789012345678901234567890' ... yes
bytearray(b'%.30d') % (123456789012345678901234567890,) =? bytearray(b'123456789012345678901234567890') ... yes
'%.31d' % 123456789012345678901234567890 =? '0123456789012345678901234567890' ... yes
b'%.31d' % (123456789012345678901234567890,) =? b'0123456789012345678901234567890' ... yes
bytearray(b'%.31d') % (123456789012345678901234567890,) =? bytearray(b'0123456789012345678901234567890') ... yes
'%32.31d' % 123456789012345678901234567890 =? ' 0123456789012345678901234567890' ... yes
b'%32.31d' % (123456789012345678901234567890,) =? b' 0123456789012345678901234567890' ... yes
bytearray(b'%32.31d') % (123456789012345678901234567890,) =? bytearray(b' 0123456789012345678901234567890') ... yes
'%d' % 1.2345678901234568e+29 =? '123456________________________' ... yes
b'%d' % (1.2345678901234568e+29,) =? b'123456________________________' ... yes
bytearray(b'%d') % (1.2345678901234568e+29,) =? bytearray(b'123456________________________') ... yes
'%x' % 1375488932362216742658885 =? '1234567890abcdef12345' ... yes
b'%x' % (1375488932362216742658885,) =? b'1234567890abcdef12345' ... yes
bytearray(b'%x') % (1375488932362216742658885,) =? bytearray(b'1234567890abcdef12345') ... yes
'%x' % -1375488932362216742658885 =? '-1234567890abcdef12345' ... yes
b'%x' % (-1375488932362216742658885,) =? b'-1234567890abcdef12345' ... yes
bytearray(b'%x') % (-1375488932362216742658885,) =? bytearray(b'-1234567890abcdef12345') ... yes
'%5x' % -1375488932362216742658885 =? '-1234567890abcdef12345' ... yes
b'%5x' % (-1375488932362216742658885,) =? b'-1234567890abcdef12345' ... yes
bytearray(b'%5x') % (-1375488932362216742658885,) =? bytearray(b'-1234567890abcdef12345') ... yes
'%22x' % -1375488932362216742658885 =? '-1234567890abcdef12345' ... yes
b'%22x' % (-1375488932362216742658885,) =? b'-1234567890abcdef12345' ... yes
bytearray(b'%22x') % (-1375488932362216742658885,) =? bytearray(b'-1234567890abcdef12345') ... yes
'%23x' % -1375488932362216742658885 =? ' -1234567890abcdef12345' ... yes
b'%23x' % (-1375488932362216742658885,) =? b' -1234567890abcdef12345' ... yes
bytearray(b'%23x') % (-1375488932362216742658885,) =? bytearray(b' -1234567890abcdef12345') ... yes
'%-23x' % -1375488932362216742658885 =? '-1234567890abcdef12345 ' ... yes
b'%-23x' % (-1375488932362216742658885,) =? b'-1234567890abcdef12345 ' ... yes
bytearray(b'%-23x') % (-1375488932362216742658885,) =? bytearray(b'-1234567890abcdef12345 ') ... yes
'%023x' % -1375488932362216742658885 =? '-01234567890abcdef12345' ... yes
b'%023x' % (-1375488932362216742658885,) =? b'-01234567890abcdef12345' ... yes
bytearray(b'%023x') % (-1375488932362216742658885,) =? bytearray(b'-01234567890abcdef12345') ... yes
'%-023x' % -1375488932362216742658885 =? '-1234567890abcdef12345 ' ... yes
b'%-023x' % (-1375488932362216742658885,) =? b'-1234567890abcdef12345 ' ... yes
bytearray(b'%-023x') % (-1375488932362216742658885,) =? bytearray(b'-1234567890abcdef12345 ') ... yes
'%025x' % -1375488932362216742658885 =? '-0001234567890abcdef12345' ... yes
b'%025x' % (-1375488932362216742658885,) =? b'-0001234567890abcdef12345' ... yes
bytearray(b'%025x') % (-1375488932362216742658885,) =? bytearray(b'-0001234567890abcdef12345') ... yes
'%025x' % 1375488932362216742658885 =? '00001234567890abcdef12345' ... yes
b'%025x' % (1375488932362216742658885,) =? b'00001234567890abcdef12345' ... yes
bytearray(b'%025x') % (1375488932362216742658885,) =? bytearray(b'00001234567890abcdef12345') ... yes
'%0+25x' % 1375488932362216742658885 =? '+0001234567890abcdef12345' ... yes
b'%0+25x' % (1375488932362216742658885,) =? b'+0001234567890abcdef12345' ... yes
bytearray(b'%0+25x') % (1375488932362216742658885,) =? bytearray(b'+0001234567890abcdef12345') ... yes
'%+25x' % 1375488932362216742658885 =? '   +1234567890abcdef12345' ... yes
b'%+25x' % (1375488932362216742658885,) =? b'   +1234567890abcdef12345' ... yes
bytearray(b'%+25x') % (1375488932362216742658885,) =? bytearray(b'   +1234567890abcdef12345') ... yes
'%25x' % 1375488932362216742658885 =? '    1234567890abcdef12345' ... yes
b'%25x' % (1375488932362216742658885,) =? b'    1234567890abcdef12345' ... yes
bytearray(b'%25x') % (1375488932362216742658885,) =? bytearray(b'    1234567890abcdef12345') ... yes
'%.2x' % 1375488932362216742658885 =? '1234567890abcdef12345' ... yes
b'%.2x' % (1375488932362216742658885,) =? b'1234567890abcdef12345' ... yes
bytearray(b'%.2x') % (1375488932362216742658885,) =? bytearray(b'1234567890abcdef12345') ... yes
'%.21x' % 1375488932362216742658885 =? '1234567890abcdef12345' ... yes
b'%.21x' % (1375488932362216742658885,) =? b'1234567890abcdef12345' ... yes
bytearray(b'%.21x') % (1375488932362216742658885,) =? bytearray(b'1234567890abcdef12345') ... yes
'%.22x' % 1375488932362216742658885 =? '01234567890abcdef12345' ... yes
b'%.22x' % (1375488932362216742658885,) =? b'01234567890abcdef12345' ... yes
bytearray(b'%.22x') % (1375488932362216742658885,) =? bytearray(b'01234567890abcdef12345') ... yes
'%23.22x' % 1375488932362216742658885 =? ' 01234567890abcdef12345' ... yes
b'%23.22x' % (1375488932362216742658885,) =? b' 01234567890abcdef12345' ... yes
bytearray(b'%23.22x') % (1375488932362216742658885,) =? bytearray(b' 01234567890abcdef12345') ... yes
'%-23.22x' % 1375488932362216742658885 =? '01234567890abcdef12345 ' ... yes
b'%-23.22x' % (1375488932362216742658885,) =? b'01234567890abcdef12345 ' ... yes
bytearray(b'%-23.22x') % (1375488932362216742658885,) =? bytearray(b'01234567890abcdef12345 ') ... yes
'%X' % 1375488932362216742658885 =? '1234567890ABCDEF12345' ... yes
b'%X' % (1375488932362216742658885,) =? b'1234567890ABCDEF12345' ... yes
bytearray(b'%X') % (1375488932362216742658885,) =? bytearray(b'1234567890ABCDEF12345') ... yes
'%#X' % 1375488932362216742658885 =? '0X1234567890ABCDEF12345' ... yes
b'%#X' % (1375488932362216742658885,) =? b'0X1234567890ABCDEF12345' ... yes
bytearray(b'%#X') % (1375488932362216742658885,) =? bytearray(b'0X1234567890ABCDEF12345') ... yes
'%#x' % 1375488932362216742658885 =? '0x1234567890abcdef12345' ... yes
b'%#x' % (1375488932362216742658885,) =? b'0x1234567890abcdef12345' ... yes
bytearray(b'%#x') % (1375488932362216742658885,) =? bytearray(b'0x1234567890abcdef12345') ... yes
'%#x' % -1375488932362216742658885 =? '-0x1234567890abcdef12345' ... yes
b'%#x' % (-1375488932362216742658885,) =? b'-0x1234567890abcdef12345' ... yes
bytearray(b'%#x') % (-1375488932362216742658885,) =? bytearray(b'-0x1234567890abcdef12345') ... yes
'%#27x' % 1375488932362216742658885 =? '    0x1234567890abcdef12345' ... yes
b'%#27x' % (1375488932362216742658885,) =? b'    0x1234567890abcdef12345' ... yes
bytearray(b'%#27x') % (1375488932362216742658885,) =? bytearray(b'    0x1234567890abcdef12345') ... yes
'%#-27x' % 1375488932362216742658885 =? '0x1234567890abcdef12345    ' ... yes
b'%#-27x' % (1375488932362216742658885,) =? b'0x1234567890abcdef12345    ' ... yes
bytearray(b'%#-27x') % (1375488932362216742658885,) =? bytearray(b'0x1234567890abcdef12345    ') ... yes
'%#027x' % 1375488932362216742658885 =? '0x00001234567890abcdef12345' ... yes
b'%#027x' % (1375488932362216742658885,) =? b'0x00001234567890abcdef12345' ... yes
bytearray(b'%#027x') % (1375488932362216742658885,) =? bytearray(b'0x00001234567890abcdef12345') ... yes
'%#.23x' % 1375488932362216742658885 =? '0x001234567890abcdef12345' ... yes
b'%#.23x' % (1375488932362216742658885,) =? b'0x001234567890abcdef12345' ... yes
bytearray(b'%#.23x') % (1375488932362216742658885,) =? bytearray(b'0x001234567890abcdef12345') ... yes
'%#.23x' % -1375488932362216742658885 =? '-0x001234567890abcdef12345' ... yes
b'%#.23x' % (-1375488932362216742658885,) =? b'-0x001234567890abcdef12345' ... yes
bytearray(b'%#.23x') % (-1375488932362216742658885,) =? bytearray(b'-0x001234567890abcdef12345') ... yes
'%#27.23x' % 1375488932362216742658885 =? '  0x001234567890abcdef12345' ... yes
b'%#27.23x' % (1375488932362216742658885,) =? b'  0x001234567890abcdef12345' ... yes
bytearray(b'%#27.23x') % (1375488932362216742658885,) =? bytearray(b'  0x001234567890abcdef12345') ... yes
'%#-27.23x' % 1375488932362216742658885 =? '0x001234567890abcdef12345  ' ... yes
b'%#-27.23x' % (1375488932362216742658885,) =? b'0x001234567890abcdef12345  ' ... yes
bytearray(b'%#-27.23x') % (1375488932362216742658885,) =? bytearray(b'0x001234567890abcdef12345  ') ... yes
'%#027.23x' % 1375488932362216742658885 =? '0x00001234567890abcdef12345' ... yes
b'%#027.23x' % (1375488932362216742658885,) =? b'0x00001234567890abcdef12345' ... yes
bytearray(b'%#027.23x') % (1375488932362216742658885,) =? bytearray(b'0x00001234567890abcdef12345') ... yes
'%#+.23x' % 1375488932362216742658885 =? '+0x001234567890abcdef12345' ... yes
b'%#+.23x' % (1375488932362216742658885,) =? b'+0x001234567890abcdef12345' ... yes
bytearray(b'%#+.23x') % (1375488932362216742658885,) =? bytearray(b'+0x001234567890abcdef12345') ... yes
'%# .23x' % 1375488932362216742658885 =? ' 0x001234567890abcdef12345' ... yes
b'%# .23x' % (1375488932362216742658885,) =? b' 0x001234567890abcdef12345' ... yes
bytearray(b'%# .23x') % (1375488932362216742658885,) =? bytearray(b' 0x001234567890abcdef12345') ... yes
'%#+.23X' % 1375488932362216742658885 =? '+0X001234567890ABCDEF12345' ... yes
b'%#+.23X' % (1375488932362216742658885,) =? b'+0X001234567890ABCDEF12345' ... yes
bytearray(b'%#+.23X') % (1375488932362216742658885,) =? bytearray(b'+0X001234567890ABCDEF12345') ... yes
'%#+027.23X' % 1375488932362216742658885 =? '+0X0001234567890ABCDEF12345' ... yes
b'%#+027.23X' % (1375488932362216742658885,) =? b'+0X0001234567890ABCDEF12345' ... yes
bytearray(b'%#+027.23X') % (1375488932362216742658885,) =? bytearray(b'+0X0001234567890ABCDEF12345') ... yes
'%# 027.23X' % 1375488932362216742658885 =? ' 0X0001234567890ABCDEF12345' ... yes
b'%# 027.23X' % (1375488932362216742658885,) =? b' 0X0001234567890ABCDEF12345' ... yes
bytearray(b'%# 027.23X') % (1375488932362216742658885,) =? bytearray(b' 0X0001234567890ABCDEF12345') ... yes
'%#+27.23X' % 1375488932362216742658885 =? ' +0X001234567890ABCDEF12345' ... yes
b'%#+27.23X' % (1375488932362216742658885,) =? b' +0X001234567890ABCDEF12345' ... yes
bytearray(b'%#+27.23X') % (1375488932362216742658885,) =? bytearray(b' +0X001234567890ABCDEF12345') ... yes
'%#-+27.23x' % 1375488932362216742658885 =? '+0x001234567890abcdef12345 ' ... yes
b'%#-+27.23x' % (1375488932362216742658885,) =? b'+0x001234567890abcdef12345 ' ... yes
bytearray(b'%#-+27.23x') % (1375488932362216742658885,) =? bytearray(b'+0x001234567890abcdef12345 ') ... yes
'%#- 27.23x' % 1375488932362216742658885 =? ' 0x001234567890abcdef12345 ' ... yes
b'%#- 27.23x' % (1375488932362216742658885,) =? b' 0x001234567890abcdef12345 ' ... yes
bytearray(b'%#- 27.23x') % (1375488932362216742658885,) =? bytearray(b' 0x001234567890abcdef12345 ') ... yes
'%o' % 12935167030485801517351291832 =? '12345670123456701234567012345670' ... yes
b'%o' % (12935167030485801517351291832,) =? b'12345670123456701234567012345670' ... yes
bytearray(b'%o') % (12935167030485801517351291832,) =? bytearray(b'12345670123456701234567012345670') ... yes
'%o' % -12935167030485801517351291832 =? '-12345670123456701234567012345670' ... yes
b'%o' % (-12935167030485801517351291832,) =? b'-12345670123456701234567012345670' ... yes
bytearray(b'%o') % (-12935167030485801517351291832,) =? bytearray(b'-12345670123456701234567012345670') ... yes
'%5o' % -12935167030485801517351291832 =? '-12345670123456701234567012345670' ... yes
b'%5o' % (-12935167030485801517351291832,) =? b'-12345670123456701234567012345670' ... yes
bytearray(b'%5o') % (-12935167030485801517351291832,) =? bytearray(b'-12345670123456701234567012345670') ... yes
'%33o' % -12935167030485801517351291832 =? '-12345670123456701234567012345670' ... yes
b'%33o' % (-12935167030485801517351291832,) =? b'-12345670123456701234567012345670' ... yes
bytearray(b'%33o') % (-12935167030485801517351291832,) =? bytearray(b'-12345670123456701234567012345670') ... yes
'%34o' % -12935167030485801517351291832 =? ' -12345670123456701234567012345670' ... yes
b'%34o' % (-12935167030485801517351291832,) =? b' -12345670123456701234567012345670' ... yes
bytearray(b'%34o') % (-12935167030485801517351291832,) =? bytearray(b' -12345670123456701234567012345670') ... yes
'%-34o' % -12935167030485801517351291832 =? '-12345670123456701234567012345670 ' ... yes
b'%-34o' % (-12935167030485801517351291832,) =? b'-12345670123456701234567012345670 ' ... yes
bytearray(b'%-34o') % (-12935167030485801517351291832,) =? bytearray(b'-12345670123456701234567012345670 ') ... yes
'%034o' % -12935167030485801517351291832 =? '-012345670123456701234567012345670' ... yes
b'%034o' % (-12935167030485801517351291832,) =? b'-012345670123456701234567012345670' ... yes
bytearray(b'%034o') % (-12935167030485801517351291832,) =? bytearray(b'-012345670123456701234567012345670') ... yes
'%-034o' % -12935167030485801517351291832 =? '-12345670123456701234567012345670 ' ... yes
b'%-034o' % (-12935167030485801517351291832,) =? b'-12345670123456701234567012345670 ' ... yes
bytearray(b'%-034o') % (-12935167030485801517351291832,) =? bytearray(b'-12345670123456701234567012345670 ') ... yes
'%036o' % -12935167030485801517351291832 =? '-00012345670123456701234567012345670' ... yes
b'%036o' % (-12935167030485801517351291832,) =? b'-00012345670123456701234567012345670' ... yes
bytearray(b'%036o') % (-12935167030485801517351291832,) =? bytearray(b'-00012345670123456701234567012345670') ... yes
'%036o' % 12935167030485801517351291832 =? '000012345670123456701234567012345670' ... yes
b'%036o' % (12935167030485801517351291832,) =? b'000012345670123456701234567012345670' ... yes
bytearray(b'%036o') % (12935167030485801517351291832,) =? bytearray(b'000012345670123456701234567012345670') ... yes
'%0+36o' % 12935167030485801517351291832 =? '+00012345670123456701234567012345670' ... yes
b'%0+36o' % (12935167030485801517351291832,) =? b'+00012345670123456701234567012345670' ... yes
bytearray(b'%0+36o') % (12935167030485801517351291832,) =? bytearray(b'+00012345670123456701234567012345670') ... yes
'%+36o' % 12935167030485801517351291832 =? '   +12345670123456701234567012345670' ... yes
b'%+36o' % (12935167030485801517351291832,) =? b'   +12345670123456701234567012345670' ... yes
bytearray(b'%+36o') % (12935167030485801517351291832,) =? bytearray(b'   +12345670123456701234567012345670') ... yes
'%36o' % 12935167030485801517351291832 =? '    12345670123456701234567012345670' ... yes
b'%36o' % (12935167030485801517351291832,) =? b'    12345670123456701234567012345670' ... yes
bytearray(b'%36o') % (12935167030485801517351291832,) =? bytearray(b'    12345670123456701234567012345670') ... yes
'%.2o' % 12935167030485801517351291832 =? '12345670123456701234567012345670' ... yes
b'%.2o' % (12935167030485801517351291832,) =? b'12345670123456701234567012345670' ... yes
bytearray(b'%.2o') % (12935167030485801517351291832,) =? bytearray(b'12345670123456701234567012345670') ... yes
'%.32o' % 12935167030485801517351291832 =? '12345670123456701234567012345670' ... yes
b'%.32o' % (12935167030485801517351291832,) =? b'12345670123456701234567012345670' ... yes
bytearray(b'%.32o') % (12935167030485801517351291832,) =? bytearray(b'12345670123456701234567012345670') ... yes
'%.33o' % 12935167030485801517351291832 =? '012345670123456701234567012345670' ... yes
b'%.33o' % (12935167030485801517351291832,) =? b'012345670123456701234567012345670' ... yes
bytearray(b'%.33o') % (12935167030485801517351291832,) =? bytearray(b'012345670123456701234567012345670') ... yes
'%34.33o' % 12935167030485801517351291832 =? ' 012345670123456701234567012345670' ... yes
b'%34.33o' % (12935167030485801517351291832,) =? b' 012345670123456701234567012345670' ... yes
bytearray(b'%34.33o') % (12935167030485801517351291832,) =? bytearray(b' 012345670123456701234567012345670') ... yes
'%-34.33o' % 12935167030485801517351291832 =? '012345670123456701234567012345670 ' ... yes
b'%-34.33o' % (12935167030485801517351291832,) =? b'012345670123456701234567012345670 ' ... yes
bytearray(b'%-34.33o') % (12935167030485801517351291832,) =? bytearray(b'012345670123456701234567012345670 ') ... yes
'%o' % 12935167030485801517351291832 =? '12345670123456701234567012345670' ... yes
b'%o' % (12935167030485801517351291832,) =? b'12345670123456701234567012345670' ... yes
bytearray(b'%o') % (12935167030485801517351291832,) =? bytearray(b'12345670123456701234567012345670') ... yes
'%#o' % 12935167030485801517351291832 =? '0o12345670123456701234567012345670' ... yes
b'%#o' % (12935167030485801517351291832,) =? b'0o12345670123456701234567012345670' ... yes
bytearray(b'%#o') % (12935167030485801517351291832,) =? bytearray(b'0o12345670123456701234567012345670') ... yes
'%#o' % -12935167030485801517351291832 =? '-0o12345670123456701234567012345670' ... yes
b'%#o' % (-12935167030485801517351291832,) =? b'-0o12345670123456701234567012345670' ... yes
bytearray(b'%#o') % (-12935167030485801517351291832,) =? bytearray(b'-0o12345670123456701234567012345670') ... yes
'%#38o' % 12935167030485801517351291832 =? '    0o12345670123456701234567012345670' ... yes
b'%#38o' % (12935167030485801517351291832,) =? b'    0o12345670123456701234567012345670' ... yes
bytearray(b'%#38o') % (12935167030485801517351291832,) =? bytearray(b'    0o12345670123456701234567012345670') ... yes
'%#-38o' % 12935167030485801517351291832 =? '0o12345670123456701234567012345670    ' ... yes
b'%#-38o' % (12935167030485801517351291832,) =? b'0o12345670123456701234567012345670    ' ... yes
bytearray(b'%#-38o') % (12935167030485801517351291832,) =? bytearray(b'0o12345670123456701234567012345670    ') ... yes
'%#038o' % 12935167030485801517351291832 =? '0o000012345670123456701234567012345670' ... yes
b'%#038o' % (12935167030485801517351291832,) =? b'0o000012345670123456701234567012345670' ... yes
bytearray(b'%#038o') % (12935167030485801517351291832,) =? bytearray(b'0o000012345670123456701234567012345670') ... yes
'%#.34o' % 12935167030485801517351291832 =? '0o0012345670123456701234567012345670' ... yes
b'%#.34o' % (12935167030485801517351291832,) =? b'0o0012345670123456701234567012345670' ... yes
bytearray(b'%#.34o') % (12935167030485801517351291832,) =? bytearray(b'0o0012345670123456701234567012345670') ... yes
'%#.34o' % -12935167030485801517351291832 =? '-0o0012345670123456701234567012345670' ... yes
b'%#.34o' % (-12935167030485801517351291832,) =? b'-0o0012345670123456701234567012345670' ... yes
bytearray(b'%#.34o') % (-12935167030485801517351291832,) =? bytearray(b'-0o0012345670123456701234567012345670') ... yes
'%#38.34o' % 12935167030485801517351291832 =? '  0o0012345670123456701234567012345670' ... yes
b'%#38.34o' % (12935167030485801517351291832,) =? b'  0o0012345670123456701234567012345670' ... yes
bytearray(b'%#38.34o') % (12935167030485801517351291832,) =? bytearray(b'  0o0012345670123456701234567012345670') ... yes
'%#-38.34o' % 12935167030485801517351291832 =? '0o0012345670123456701234567012345670  ' ... yes
b'%#-38.34o' % (12935167030485801517351291832,) =? b'0o0012345670123456701234567012345670  ' ... yes
bytearray(b'%#-38.34o') % (12935167030485801517351291832,) =? bytearray(b'0o0012345670123456701234567012345670  ') ... yes
'%#038.34o' % 12935167030485801517351291832 =? '0o000012345670123456701234567012345670' ... yes
b'%#038.34o' % (12935167030485801517351291832,) =? b'0o000012345670123456701234567012345670' ... yes
bytearray(b'%#038.34o') % (12935167030485801517351291832,) =? bytearray(b'0o000012345670123456701234567012345670') ... yes
'%#+.34o' % 12935167030485801517351291832 =? '+0o0012345670123456701234567012345670' ... yes
b'%#+.34o' % (12935167030485801517351291832,) =? b'+0o0012345670123456701234567012345670' ... yes
bytearray(b'%#+.34o') % (12935167030485801517351291832,) =? bytearray(b'+0o0012345670123456701234567012345670') ... yes
'%# .34o' % 12935167030485801517351291832 =? ' 0o0012345670123456701234567012345670' ... yes
b'%# .34o' % (12935167030485801517351291832,) =? b' 0o0012345670123456701234567012345670' ... yes
bytearray(b'%# .34o') % (12935167030485801517351291832,) =? bytearray(b' 0o0012345670123456701234567012345670') ... yes
'%#+38.34o' % 12935167030485801517351291832 =? ' +0o0012345670123456701234567012345670' ... yes
b'%#+38.34o' % (12935167030485801517351291832,) =? b' +0o0012345670123456701234567012345670' ... yes
bytearray(b'%#+38.34o') % (12935167030485801517351291832,) =? bytearray(b' +0o0012345670123456701234567012345670') ... yes
'%#-+38.34o' % 12935167030485801517351291832 =? '+0o0012345670123456701234567012345670 ' ... yes
b'%#-+38.34o' % (12935167030485801517351291832,) =? b'+0o0012345670123456701234567012345670 ' ... yes
bytearray(b'%#-+38.34o') % (12935167030485801517351291832,) =? bytearray(b'+0o0012345670123456701234567012345670 ') ... yes
'%#- 38.34o' % 12935167030485801517351291832 =? ' 0o0012345670123456701234567012345670 ' ... yes
b'%#- 38.34o' % (12935167030485801517351291832,) =? b' 0o0012345670123456701234567012345670 ' ... yes
bytearray(b'%#- 38.34o') % (12935167030485801517351291832,) =? bytearray(b' 0o0012345670123456701234567012345670 ') ... yes
'%#+038.34o' % 12935167030485801517351291832 =? '+0o00012345670123456701234567012345670' ... yes
b'%#+038.34o' % (12935167030485801517351291832,) =? b'+0o00012345670123456701234567012345670' ... yes
bytearray(b'%#+038.34o') % (12935167030485801517351291832,) =? bytearray(b'+0o00012345670123456701234567012345670') ... yes
'%# 038.34o' % 12935167030485801517351291832 =? ' 0o00012345670123456701234567012345670' ... yes
b'%# 038.34o' % (12935167030485801517351291832,) =? b' 0o00012345670123456701234567012345670' ... yes
bytearray(b'%# 038.34o') % (12935167030485801517351291832,) =? bytearray(b' 0o00012345670123456701234567012345670') ... yes
'%.33o' % 12935167030485801517351291832 =? '012345670123456701234567012345670' ... yes
b'%.33o' % (12935167030485801517351291832,) =? b'012345670123456701234567012345670' ... yes
bytearray(b'%.33o') % (12935167030485801517351291832,) =? bytearray(b'012345670123456701234567012345670') ... yes
'%#.33o' % 12935167030485801517351291832 =? '0o012345670123456701234567012345670' ... yes
b'%#.33o' % (12935167030485801517351291832,) =? b'0o012345670123456701234567012345670' ... yes
bytearray(b'%#.33o') % (12935167030485801517351291832,) =? bytearray(b'0o012345670123456701234567012345670') ... yes
'%#.32o' % 12935167030485801517351291832 =? '0o12345670123456701234567012345670' ... yes
b'%#.32o' % (12935167030485801517351291832,) =? b'0o12345670123456701234567012345670' ... yes
bytearray(b'%#.32o') % (12935167030485801517351291832,) =? bytearray(b'0o12345670123456701234567012345670') ... yes
'%035.33o' % 12935167030485801517351291832 =? '00012345670123456701234567012345670' ... yes
b'%035.33o' % (12935167030485801517351291832,) =? b'00012345670123456701234567012345670' ... yes
bytearray(b'%035.33o') % (12935167030485801517351291832,) =? bytearray(b'00012345670123456701234567012345670') ... yes
'%0#35.33o' % 12935167030485801517351291832 =? '0o012345670123456701234567012345670' ... yes
b'%0#35.33o' % (12935167030485801517351291832,) =? b'0o012345670123456701234567012345670' ... yes
bytearray(b'%0#35.33o') % (12935167030485801517351291832,) =? bytearray(b'0o012345670123456701234567012345670') ... yes
'%d' % 42 =? '42' ... yes
b'%d' % (42,) =? b'42' ... yes
bytearray(b'%d') % (42,) =? bytearray(b'42') ... yes
'%d' % -42 =? '-42' ... yes
b'%d' % (-42,) =? b'-42' ... yes
bytearray(b'%d') % (-42,) =? bytearray(b'-42') ... yes
'%d' % 42.0 =? '42' ... yes
b'%d' % (42.0,) =? b'42' ... yes
bytearray(b'%d') % (42.0,) =? bytearray(b'42') ... yes
'%#x' % 1 =? '0x1' ... yes
b'%#x' % (1,) =? b'0x1' ... yes
bytearray(b'%#x') % (1,) =? bytearray(b'0x1') ... yes
'%#X' % 1 =? '0X1' ... yes
b'%#X' % (1,) =? b'0X1' ... yes
bytearray(b'%#X') % (1,) =? bytearray(b'0X1') ... yes
'%#o' % 1 =? '0o1' ... yes
b'%#o' % (1,) =? b'0o1' ... yes
bytearray(b'%#o') % (1,) =? bytearray(b'0o1') ... yes
'%#o' % 0 =? '0o0' ... yes
b'%#o' % (0,) =? b'0o0' ... yes
bytearray(b'%#o') % (0,) =? bytearray(b'0o0') ... yes
'%o' % 0 =? '0' ... yes
b'%o' % (0,) =? b'0' ... yes
bytearray(b'%o') % (0,) =? bytearray(b'0') ... yes
'%d' % 0 =? '0' ... yes
b'%d' % (0,) =? b'0' ... yes
bytearray(b'%d') % (0,) =? bytearray(b'0') ... yes
'%#x' % 0 =? '0x0' ... yes
b'%#x' % (0,) =? b'0x0' ... yes
bytearray(b'%#x') % (0,) =? bytearray(b'0x0') ... yes
'%#X' % 0 =? '0X0' ... yes
b'%#X' % (0,) =? b'0X0' ... yes
bytearray(b'%#X') % (0,) =? bytearray(b'0X0') ... yes
'%x' % 66 =? '42' ... yes
b'%x' % (66,) =? b'42' ... yes
bytearray(b'%x') % (66,) =? bytearray(b'42') ... yes
'%x' % -66 =? '-42' ... yes
b'%x' % (-66,) =? b'-42' ... yes
bytearray(b'%x') % (-66,) =? bytearray(b'-42') ... yes
'%o' % 34 =? '42' ... yes
b'%o' % (34,) =? b'42' ... yes
bytearray(b'%o') % (34,) =? bytearray(b'42') ... yes
'%o' % -34 =? '-42' ... yes
b'%o' % (-34,) =? b'-42' ... yes
bytearray(b'%o') % (-34,) =? bytearray(b'-42') ... yes
'%g' % 1.1 =? '1.1' ... yes
b'%g' % (1.1,) =? b'1.1' ... yes
bytearray(b'%g') % (1.1,) =? bytearray(b'1.1') ... yes
'%#g' % 1.1 =? '1.10000' ... yes
b'%#g' % (1.1,) =? b'1.10000' ... yes
bytearray(b'%#g') % (1.1,) =? bytearray(b'1.10000') ... yes
Testing exceptions
'%' % () works? ... yes
b'%' % () works? ... yes
'% %s' % 1 works? ... no
Unexpected  <class 'ValueError'> : "extra character ' ' (0x20) before escaped '%' at index 1, use '%%'"
b'% %s' % 1 works? ... no
Unexpected  <class 'ValueError'> : "extra character b' ' (0x20) before escaped '%' at index 1, use '%%'"
'%d' % '1' works? ... yes
b'%d' % '1' works? ... yes
'%d' % b'1' works? ... yes
b'%d' % b'1' works? ... yes
'%x' % '1' works? ... yes
b'%x' % '1' works? ... yes
'%x' % 3.14 works? ... yes
b'%x' % 3.14 works? ... yes
ok
test_g_format_has_no_trailing_zeros (test.test_format.FormatTest.test_g_format_has_no_trailing_zeros) ... ok
test_locale (test.test_format.FormatTest.test_locale) ... ok
test_negative_zero (test.test_format.FormatTest.test_negative_zero) ... ok
test_non_ascii (test.test_format.FormatTest.test_non_ascii) ... '\u20ac=%f' % (1.0,) =? '\u20ac=1.000000' ... yes
ok
test_nul (test.test_format.FormatTest.test_nul) ... 'a\x00b' % () =? 'a\x00b' ... yes
b'a\x00b' % () =? b'a\x00b' ... yes
bytearray(b'a\x00b') % () =? bytearray(b'a\x00b') ... yes
'a%cb' % (0,) =? 'a\x00b' ... yes
b'a%cb' % (0,) =? b'a\x00b' ... yes
bytearray(b'a%cb') % (0,) =? bytearray(b'a\x00b') ... yes
'a%sb' % ('c\x00d',) =? 'ac\x00db' ... yes
b'a%sb' % (b'c\x00d',) =? b'ac\x00db' ... yes
bytearray(b'a%sb') % (b'c\x00d',) =? bytearray(b'ac\x00db') ... yes
ok
test_optimisations (test.test_format.FormatTest.test_optimisations) ... skipped 'implementation detail specific to cpython'
test_precision (test.test_format.FormatTest.test_precision) ... ok
test_precision_c_limits (test.test_format.FormatTest.test_precision_c_limits) ... skipped 'implementation detail specific to cpython'
test_specifier_z_error (test.test_format.FormatTest.test_specifier_z_error) ... FAIL
test_str_format (test.test_format.FormatTest.test_str_format) ... '%r' % '\u0378' =? "'\\u0378'" ... yes
'%a' % '\u0378' =? "'\\u0378'" ... yes
'%r' % '\u0374' =? "'\u0374'" ... yes
'%a' % '\u0374' =? "'\\u0374'" ... yes
Testing exceptions
'abc %b' % 1 works? ... yes
'%g' % '1' works? ... yes
'no format' % '1' works? ... yes
'%c' % -1 works? ... no
Unexpected  <class 'OverflowError'> : 'unicode character code out of range'
'%c' % 1114112 works? ... no
Unexpected  <class 'OverflowError'> : 'unicode character code out of range'
'%c' % 3.14 works? ... yes
'%c' % 'ab' works? ... yes
'%c' % b'x' works? ... yes
ok
test_unicode_in_error_message (test.test_format.FormatTest.test_unicode_in_error_message) ... ok
test_with_a_commas_and_an_underscore_in_format_specifier (test.test_format.FormatTest.test_with_a_commas_and_an_underscore_in_format_specifier) ... ok
test_with_an_underscore_and_a_comma_in_format_specifier (test.test_format.FormatTest.test_with_an_underscore_and_a_comma_in_format_specifier) ... ok
test_with_two_commas_in_format_specifier (test.test_format.FormatTest.test_with_two_commas_in_format_specifier) ... ok
test_with_two_underscore_in_format_specifier (test.test_format.FormatTest.test_with_two_underscore_in_format_specifier) ... ok

======================================================================
FAIL: test_specifier_z_error (test.test_format.FormatTest.test_specifier_z_error)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_format.py", line 623, in test_specifier_z_error
    b"%z.1f" % 0
    ~~~~~~~~~^~~
ValueError: unsupported format character b'z' (0x7a) at index 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_format.py", line 622, in test_specifier_z_error
    with self.assertRaisesRegex(ValueError, error_msg):
AssertionError: "unsupported\ format\ character\ 'z'" does not match "unsupported format character b'z' (0x7a) at index 1"

----------------------------------------------------------------------
Ran 18 tests in 0.014s

FAILED (failures=1, skipped=2)
0:00:00 load avg: 5.38 [1/1/1] test_format failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_format

Total duration: 80 ms
Total tests: run=18 failures=1 skipped=2
Total test files: run=1/1 failed=1
Result: FAILURE
test test_format failed
builder: pypy-c-jit-macos-arm64 build #1306+
test: lib-python/3/test/test_format.py::unmodified