mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add a test that exercises the error handling part of
PyUnicode_EncodeDecimal().
This commit is contained in:
parent
adc727490b
commit
395bb49555
1 changed files with 6 additions and 0 deletions
|
@ -679,6 +679,12 @@ except ValueError:
|
|||
pass
|
||||
else:
|
||||
raise TestFailed, '"\\".decode("unicode-escape") should fail'
|
||||
try:
|
||||
int(u"\u0200")
|
||||
except UnicodeError:
|
||||
pass
|
||||
else:
|
||||
raise TestFailed, "int(u'\\u0200') failed to raise an exception"
|
||||
|
||||
verify(u'hello'.encode('ascii') == 'hello')
|
||||
verify(u'hello'.encode('utf-7') == 'hello')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue