MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_nonbmp

Method test_nonbmp

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

Source from the content-addressed store, hash-verified

777 self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
778
779 def test_nonbmp(self):
780 self.assertEqual("\U00010203".encode(self.encoding),
781 b'\x00\xd8\x03\xde')
782 self.assertEqual(b'\x00\xd8\x03\xde'.decode(self.encoding),
783 "\U00010203")
784
785class UTF16BETest(ReadTest, unittest.TestCase):
786 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