[Python-checkins] python/dist/src/Lib/test test_codecs.py, 1.24, 1.25
loewis@users.sourceforge.net
loewis at users.sourceforge.net
Thu Aug 25 13:03:48 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10784/Lib/test
Modified Files:
test_codecs.py
Log Message:
Make IDNA return an empty string when the input is empty. Fixes #1163178.
Will backport to 2.4.
Index: test_codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecs.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- test_codecs.py 20 Jul 2005 22:15:39 -0000 1.24
+++ test_codecs.py 25 Aug 2005 11:03:38 -0000 1.25
@@ -630,6 +630,12 @@
def test_builtin(self):
self.assertEquals(unicode("python.org", "idna"), u"python.org")
+ def test_stream(self):
+ import StringIO
+ r = codecs.getreader("idna")(StringIO.StringIO("abc"))
+ r.read(3)
+ self.assertEquals(r.read(), u"")
+
class CodecsModuleTest(unittest.TestCase):
def test_decode(self):
More information about the Python-checkins
mailing list