[Python-checkins] python/dist/src/Lib/test test_unicode.py,1.81,1.82

doerwalter@users.sourceforge.net doerwalter@users.sourceforge.net
Wed, 02 Apr 2003 08:37:26 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv13323/Lib/test

Modified Files:
	test_unicode.py 
Log Message:
Change formatchar(), so that u"%c" % 0xffffffff now raises
an OverflowError instead of a TypeError to be consistent
with "%c" % 256. See SF patch #710127.


Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** test_unicode.py	31 Mar 2003 18:18:41 -0000	1.81
--- test_unicode.py	2 Apr 2003 16:37:24 -0000	1.82
***************
*** 361,365 ****
  
          self.assertEqual(u'%c' % 0x1234, u'\u1234')
!         self.assertRaises(ValueError, u"%c".__mod__, (sys.maxunicode+1,))
  
          # formatting jobs delegated from the string implementation:
--- 361,365 ----
  
          self.assertEqual(u'%c' % 0x1234, u'\u1234')
!         self.assertRaises(OverflowError, u"%c".__mod__, (sys.maxunicode+1,))
  
          # formatting jobs delegated from the string implementation: