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

Method test_nonbmp

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

Source from the content-addressed store, hash-verified

822 self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
823
824 def test_nonbmp(self):
825 self.assertEqual("\U00010203".encode(self.encoding),
826 b'\xd8\x00\xde\x03')
827 self.assertEqual(b'\xd8\x00\xde\x03'.decode(self.encoding),
828 "\U00010203")
829
830class UTF8Test(ReadTest, unittest.TestCase):
831 encoding = "utf-8"

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected