]> granicus.if.org Git - python/commitdiff
Add a test that exercises the error handling part of
authorWalter Dörwald <walter@livinglogic.de>
Wed, 8 Jan 2003 23:02:34 +0000 (23:02 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Wed, 8 Jan 2003 23:02:34 +0000 (23:02 +0000)
PyUnicode_EncodeDecimal().

Lib/test/test_unicode.py

index 2a94586cb9cecece916b6533cb615431128f5297..104f8f1b07b5868f68ae44e532539c910f06b61e 100644 (file)
@@ -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')