diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2005-08-25 11:03:38 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2005-08-25 11:03:38 (GMT) |
commit | 8b59514e5799fc41e84afeef0892219d9aa3e872 (patch) | |
tree | 19b50ad761d07e49c156f94cf20de31345132350 /Lib/test | |
parent | 8246c439a8246093b03e3987d6c1496ebe73b81c (diff) | |
download | cpython-8b59514e5799fc41e84afeef0892219d9aa3e872.zip cpython-8b59514e5799fc41e84afeef0892219d9aa3e872.tar.gz cpython-8b59514e5799fc41e84afeef0892219d9aa3e872.tar.bz2 |
Make IDNA return an empty string when the input is empty. Fixes #1163178.
Will backport to 2.4.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_codecs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 5f799e0..5189e80 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -630,6 +630,12 @@ class CodecTest(unittest.TestCase): 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): |