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

Method test_decode_surrogatepass

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

Source from the content-addressed store, hash-verified

3816 self.check_decode_strings("surrogateescape")
3817
3818 def test_decode_surrogatepass(self):
3819 try:
3820 self.decode(b'', 'surrogatepass')
3821 except ValueError as exc:
3822 if str(exc) == 'unsupported error handler':
3823 self.skipTest(f"{self.ENCODING!r} decoder doesn't support "
3824 f"surrogatepass error handler")
3825 else:
3826 raise
3827
3828 self.check_decode_strings("surrogatepass")
3829
3830 def test_decode_unsupported_error_handler(self):
3831 with self.assertRaises(ValueError) as cm:

Callers

nothing calls this directly

Calls 4

decodeMethod · 0.95
check_decode_stringsMethod · 0.95
strFunction · 0.85
skipTestMethod · 0.80

Tested by

no test coverage detected