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

Method test_escape_decode

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

Source from the content-addressed store, hash-verified

2657 check('\U0001d120', br'\U0001d120')
2658
2659 def test_escape_decode(self):
2660 decode = codecs.unicode_escape_decode
2661 check = coding_checker(self, decode)
2662 check(b"[\\\n]", "[]")
2663 check(br'[\"]', '["]')
2664 check(br"[\']", "[']")
2665 check(br"[\\]", r"[\]")
2666 check(br"[\a]", "[\x07]")
2667 check(br"[\b]", "[\x08]")
2668 check(br"[\t]", "[\x09]")
2669 check(br"[\n]", "[\x0a]")
2670 check(br"[\v]", "[\x0b]")
2671 check(br"[\f]", "[\x0c]")
2672 check(br"[\r]", "[\x0d]")
2673 check(br"[\7]", "[\x07]")
2674 check(br"[\78]", "[\x078]")
2675 check(br"[\41]", "[!]")
2676 check(br"[\418]", "[!8]")
2677 check(br"[\101]", "[A]")
2678 check(br"[\1010]", "[A0]")
2679 check(br"[\x41]", "[A]")
2680 check(br"[\x410]", "[A0]")
2681 check(br"\u20ac", "\u20ac")
2682 check(br"\U0001d120", "\U0001d120")
2683
2684 def test_decode_warnings(self):
2685 decode = codecs.unicode_escape_decode

Callers

nothing calls this directly

Calls 2

coding_checkerFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected