[Python-checkins] python/dist/src/Lib/test test_binascii.py,1.15,1.16
twouters@users.sourceforge.net
twouters@users.sourceforge.net
Mon, 17 Mar 2003 03:24:32 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv14143/Lib/test
Modified Files:
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.
Will backport to 2.2-maint (consider it done.)
Index: test_binascii.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_binascii.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_binascii.py 30 Jul 2002 23:26:01 -0000 1.15
--- test_binascii.py 17 Mar 2003 11:24:29 -0000 1.16
***************
*** 70,73 ****
--- 70,77 ----
verify(res == testdata)
+ # Test base64 with just invalid characters, which should return
+ # empty strings. TBD: shouldn't it raise an exception instead ?
+ verify(binascii.a2b_base64(fillers) == '')
+
# Test uu
print "uu test"