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

Method test_nonbmp

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

Source from the content-addressed store, hash-verified

778 self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
779
780 def test_nonbmp(self):
781 self.assertEqual("\U00010203".encode(self.encoding),
782 b'\x00\xd8\x03\xde')
783 self.assertEqual(b'\x00\xd8\x03\xde'.decode(self.encoding),
784 "\U00010203")
785
786class UTF16BETest(ReadTest, unittest.TestCase):
787 encoding = "utf-16-be"

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected