[Python-checkins] python/dist/src/Lib/test test_binascii.py,1.11,1.11.10.1

twouters@users.sourceforge.net twouters@users.sourceforge.net
2003年3月17日 03:34:45 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv18224/Lib/test
Modified Files:
 Tag: release22-maint
	test_binascii.py 
Log Message:
binascii_a2b_base64: Properly return an empty string if the input was all
 invalid, rather than returning a string of random garbage of the
 estimated result length. Closes SF patch #703471 by Hye-Shik Chang.
Backport from 2.3.
Index: test_binascii.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_binascii.py,v
retrieving revision 1.11
retrieving revision 1.11.10.1
diff -C2 -d -r1.11 -r1.11.10.1
*** test_binascii.py	18 Oct 2001 21:57:37 -0000	1.11
--- test_binascii.py	17 Mar 2003 11:34:43 -0000	1.11.10.1
***************
*** 70,73 ****
--- 70,77 ----
 verify(res == testdata)
 
+ # Test base64 with just invalid characters, which should return
+ # empty strings.
+ verify(binascii.a2b_base64(fillers) == '')
+ 
 # Test uu
 print "uu test"

AltStyle によって変換されたページ (->オリジナル) /