Skip to content

Commit a1dde13

Browse files
committed
Add test case for unicode(somestring, "idna").
1 parent aaeffaf commit a1dde13

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/test/test_codecs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,18 @@ def test_nameprep(self):
332332
except Exception,e:
333333
raise test_support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
334334

335+
class CodecTest(unittest.TestCase):
336+
def test_builtin(self):
337+
self.assertEquals(unicode("python.org", "idna"), u"python.org")
338+
335339
def test_main():
336340
test_support.run_unittest(
337341
UTF16Test,
338342
EscapeDecodeTest,
339343
RecodingTest,
340344
PunycodeTest,
341-
NameprepTest
345+
NameprepTest,
346+
CodecTest
342347
)
343348

344349

0 commit comments

Comments
 (0)