summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-08-05 06:19:47 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-08-05 06:19:47 (GMT)
commit0d8e16c7adb3ac57d74e86bcf2311215ced1d034 (patch)
tree646731f6130f1a23144fae61e3c5d5469df1511a /Lib/test
parent8db4403a768b711bbda1857ab4f38ed4be726e4b (diff)
downloadcpython-0d8e16c7adb3ac57d74e86bcf2311215ced1d034.zip
cpython-0d8e16c7adb3ac57d74e86bcf2311215ced1d034.tar.gz
cpython-0d8e16c7adb3ac57d74e86bcf2311215ced1d034.tar.bz2
Support trailing dots in DNS names. Fixes #782510. Will backport to 2.3.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_unicode.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 8e1f0b1..6e40b9f 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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')