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

Method test_raw_decode

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

Source from the content-addressed store, hash-verified

2642 self.assertEqual(encode(chr(b)), (bytes([b]), 1))
2643
2644 def test_raw_decode(self):
2645 decode = codecs.unicode_escape_decode
2646 for b in range(256):
2647 if b != b'\\'[0]:
2648 self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
2649
2650 def test_escape_encode(self):
2651 encode = codecs.unicode_escape_encode

Callers

nothing calls this directly

Calls 3

chrFunction · 0.85
decodeFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected