summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-01-08 23:02:34 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-01-08 23:02:34 (GMT)
commit395bb495558126d2fb47be319f51539feb66fea4 (patch)
tree8c11e36bee0fc95133364d3978b9ee84ef39c007 /Lib/test/test_unicode.py
parentadc727490b521b1de27088b160382396d7b52a8a (diff)
downloadcpython-395bb495558126d2fb47be319f51539feb66fea4.zip
cpython-395bb495558126d2fb47be319f51539feb66fea4.tar.gz
cpython-395bb495558126d2fb47be319f51539feb66fea4.tar.bz2
Add a test that exercises the error handling part of
PyUnicode_EncodeDecimal().
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 2a94586..104f8f1 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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')