Support trailing dots in DNS names. Fixes #782510. Will backport to 2.3.

This commit is contained in:
Martin v. Löwis 2003-08-05 06:19:47 +00:00
parent 8db4403a76
commit 0d8e16c7ad
2 changed files with 19 additions and 3 deletions

View file

@ -524,6 +524,10 @@ class UnicodeTest(
# * strict decoding testing for all of the
# UTF8_ERROR cases in PyUnicode_DecodeUTF8
def test_codecs_idna(self):
# Test whether trailing dot is preserved
self.assertEqual(u"www.python.org.".encode("idna"), "www.python.org.")
def test_codecs_errors(self):
# Error handling (encoding)
self.assertRaises(UnicodeError, u'Andr\202 x'.encode, 'ascii')