mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Make IDNA return an empty string when the input is empty. Fixes #1163178.
Will backport to 2.4.
This commit is contained in:
parent
8246c439a8
commit
8b59514e57
3 changed files with 14 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue