# non-ascii format, ascii argument
self.assertRaisesRegexp(ValueError,
'^PyUnicode_FromFormatV\(\) expects an ASCII-encoded format '
- 'string, got a non-ascii byte: 0xe9$',
+ 'string, got a non-ASCII byte: 0xe9$',
format_unicode, b'unicode\xe9=%s', 'ascii')
def test_main():
else if (128 <= (unsigned char)*f) {
PyErr_Format(PyExc_ValueError,
"PyUnicode_FromFormatV() expects an ASCII-encoded format "
- "string, got a non-ascii byte: 0x%02x",
+ "string, got a non-ASCII byte: 0x%02x",
(unsigned char)*f);
- return NULL;
+ goto fail;
}
}
/* step 2: allocate memory for the results of