[Python-checkins] python/dist/src/Lib/test test_codecs.py, 1.15.2.6, 1.15.2.7

loewis@users.sourceforge.net loewis at users.sourceforge.net
Thu Aug 25 13:04:14 CEST 2005


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

Modified Files:
      Tag: release24-maint
	test_codecs.py 
Log Message:
Make IDNA return an empty string when the input is empty. Fixes #1163178.


Index: test_codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_codecs.py,v
retrieving revision 1.15.2.6
retrieving revision 1.15.2.7
diff -u -d -r1.15.2.6 -r1.15.2.7
--- test_codecs.py	20 Jul 2005 22:52:09 -0000	1.15.2.6
+++ test_codecs.py	25 Aug 2005 11:04:04 -0000	1.15.2.7
@@ -632,6 +632,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