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

Method test_escape_encode

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

Source from the content-addressed store, hash-verified

2789 self.assertEqual(decode(bytes([b]) + b'0'), (chr(b) + '0', 2))
2790
2791 def test_escape_encode(self):
2792 encode = codecs.raw_unicode_escape_encode
2793 check = coding_checker(self, encode)
2794 for b in range(256):
2795 if b not in b'uU':
2796 check('\\' + chr(b), b'\\' + bytes([b]))
2797 check('\u20ac', br'\u20ac')
2798 check('\U0001d120', br'\U0001d120')
2799
2800 def test_escape_decode(self):
2801 decode = codecs.raw_unicode_escape_decode

Callers

nothing calls this directly

Calls 2

coding_checkerFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected