MCPcopy Index your code
hub / github.com/python/cpython / test_builtin_decode

Method test_builtin_decode

Lib/test/test_codecs.py:1596–1607  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1594 ]
1595
1596 def test_builtin_decode(self):
1597 self.assertEqual(str(b"python.org", "idna"), "python.org")
1598 self.assertEqual(str(b"python.org.", "idna"), "python.org.")
1599 self.assertEqual(str(b"xn--pythn-mua.org", "idna"), "pyth\xf6n.org")
1600 self.assertEqual(str(b"xn--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
1601 self.assertEqual(str(b"XN--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
1602 self.assertEqual(str(b"xN--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
1603 self.assertEqual(str(b"Xn--pythn-mua.org.", "idna"), "pyth\xf6n.org.")
1604 self.assertEqual(str(b"bugs.xn--pythn-mua.org.", "idna"),
1605 "bugs.pyth\xf6n.org.")
1606 self.assertEqual(str(b"bugs.XN--pythn-mua.org.", "idna"),
1607 "bugs.pyth\xf6n.org.")
1608
1609 def test_builtin_decode_invalid(self):
1610 for case, expected in self.invalid_decode_testcases:

Callers

nothing calls this directly

Calls 2

strFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected