[Python-checkins] python/dist/src/Lib/test test_unicode.py, 1.84.8.1, 1.84.8.2

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 5 12:44:28 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10527/Lib/test

Modified Files:
      Tag: release23-maint
	test_unicode.py 
Log Message:
Backport checkin:
Fix reallocation bug in unicode.translate(): The code was comparing
characters instead of character pointers to determine space requirements.


Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.84.8.1
retrieving revision 1.84.8.2
diff -C2 -d -r1.84.8.1 -r1.84.8.2
*** test_unicode.py	5 Aug 2003 06:20:23 -0000	1.84.8.1
--- test_unicode.py	5 Feb 2004 17:44:26 -0000	1.84.8.2
***************
*** 130,133 ****
--- 130,134 ----
          self.checkequalnofix(u'<i><i><i>c', u'abababc', 'translate', {ord('a'):None, ord('b'):u'<i>'})
          self.checkequalnofix(u'c', u'abababc', 'translate', {ord('a'):None, ord('b'):u''})
+         self.checkequalnofix(u'xyyx', u'xzx', 'translate', {ord('z'):u'yy'})
  
          self.assertRaises(TypeError, u'hello'.translate)




More information about the Python-checkins mailing list