bpo-34087: Backport tests for int/float/complex (GH-8274)

Cherrypick tests from 16dfca4d82

While the regression is not in 3.6, it's worth to backport test cases
to 3.6 branch too.
This commit is contained in:
INADA Naoki 2018-07-14 16:38:14 +09:00 committed by GitHub
parent 083a836937
commit b2f8aa0c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View file

@ -391,6 +391,8 @@ _Py_string_to_number_with_underscores(
char *dup, *end;
PyObject *result;
assert(s[orig_len] == '\0');
if (strchr(s, '_') == NULL) {
return innerfunc(s, orig_len, arg);
}