From 395bb495558126d2fb47be319f51539feb66fea4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Walter=20D=C3=B6rwald?= Date: Wed, 8 Jan 2003 23:02:34 +0000 Subject: [PATCH] Add a test that exercises the error handling part of PyUnicode_EncodeDecimal(). --- Lib/test/test_unicode.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 2a94586cb9..104f8f1b07 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') -- 2.40.0