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

Method test_encode_surrogatepass

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

Source from the content-addressed store, hash-verified

3756 self.check_encode_strings("surrogateescape")
3757
3758 def test_encode_surrogatepass(self):
3759 try:
3760 self.encode('', 'surrogatepass')
3761 except ValueError as exc:
3762 if str(exc) == 'unsupported error handler':
3763 self.skipTest(f"{self.ENCODING!r} encoder doesn't support "
3764 f"surrogatepass error handler")
3765 else:
3766 raise
3767
3768 self.check_encode_strings("surrogatepass")
3769
3770 def test_encode_unsupported_error_handler(self):
3771 with self.assertRaises(ValueError) as cm:

Callers

nothing calls this directly

Calls 4

encodeMethod · 0.95
check_encode_stringsMethod · 0.95
strFunction · 0.85
skipTestMethod · 0.80

Tested by

no test coverage detected