[Python-checkins] python/dist/src/Lib/test test_unicode.py, 1.86, 1.87

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 5 12:36:02 EST 2004


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

Modified Files:
	test_unicode.py 
Log Message:
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.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** test_unicode.py	6 Oct 2003 05:08:26 -0000	1.86
--- test_unicode.py	5 Feb 2004 17:36:00 -0000	1.87
***************
*** 137,140 ****
--- 137,141 ----
          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