[Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.47,1.47.6.1
Michael Hudson
mwh@users.sourceforge.net
Mon, 18 Mar 2002 04:54:53 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv11778
Modified Files:
Tag: release22-maint
test_unicode.py
Log Message:
doerwalter's failing examples from
[ 529104 ] broken error handling in unicode-escape
Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.47
retrieving revision 1.47.6.1
diff -C2 -d -r1.47 -r1.47.6.1
*** test_unicode.py 10 Dec 2001 20:57:34 -0000 1.47
--- test_unicode.py 18 Mar 2002 12:54:51 -0000 1.47.6.1
***************
*** 540,543 ****
--- 540,551 ----
verify(unicode('Andr\202 x','ascii','replace') == u'Andr\uFFFD x')
+ verify("\\N{foo}xx".decode("unicode-escape", "ignore") == u"xx")
+ try:
+ "\\".decode("unicode-escape")
+ except ValueError:
+ pass
+ else:
+ raise TestFailed, '"\\".decode("unicode-escape") should fail'
+
verify(u'hello'.encode('ascii') == 'hello')
verify(u'hello'.encode('utf-7') == 'hello')