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

Method test_escape_decode

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

Source from the content-addressed store, hash-verified

2663 check('\U0001d120', br'\U0001d120')
2664
2665 def test_escape_decode(self):
2666 decode = codecs.unicode_escape_decode
2667 check = coding_checker(self, decode)
2668 check(b"[\\\n]", "[]")
2669 check(br'[\"]', '["]')
2670 check(br"[\']", "[']")
2671 check(br"[\\]", r"[\]")
2672 check(br"[\a]", "[\x07]")
2673 check(br"[\b]", "[\x08]")
2674 check(br"[\t]", "[\x09]")
2675 check(br"[\n]", "[\x0a]")
2676 check(br"[\v]", "[\x0b]")
2677 check(br"[\f]", "[\x0c]")
2678 check(br"[\r]", "[\x0d]")
2679 check(br"[\7]", "[\x07]")
2680 check(br"[\78]", "[\x078]")
2681 check(br"[\41]", "[!]")
2682 check(br"[\418]", "[!8]")
2683 check(br"[\101]", "[A]")
2684 check(br"[\1010]", "[A0]")
2685 check(br"[\x41]", "[A]")
2686 check(br"[\x410]", "[A0]")
2687 check(br"\u20ac", "\u20ac")
2688 check(br"\U0001d120", "\U0001d120")
2689
2690 @unittest.expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
2691 def test_decode_warnings(self):

Callers

nothing calls this directly

Calls 2

coding_checkerFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected