diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-11-23 15:56:41 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-11-23 15:56:41 +0100 |
commit | 7b53f4ba313ddc97503a1b20a32c7ece98e6f14f (patch) | |
tree | d4a1ae925557271361d6681d52110a9baab414f8 /Python/formatter_unicode.c | |
parent | 45d2905e417a1edcec07d77bb7a2b5e16a6d7a85 (diff) | |
parent | 86a6e9bbd9773fe387dae31f7ca24ccfcdc7ded1 (diff) | |
download | cpython-7b53f4ba313ddc97503a1b20a32c7ece98e6f14f.tar.gz |
Issue #22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r-- | Python/formatter_unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index e3a8149841..056bb76902 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -846,6 +846,13 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format, " format specifier 'c'"); goto done; } + /* error to request alternate format */ + if (format->alternate) { + PyErr_SetString(PyExc_ValueError, + "Alternate form (#) not allowed with integer" + " format specifier 'c'"); + goto done; + } /* taken from unicodeobject.c formatchar() */ /* Integer input truncated to a character */ |