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

Method test_encode_surrogatepass

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

Source from the content-addressed store, hash-verified

3769 self.check_encode_strings("surrogateescape")
3770
3771 def test_encode_surrogatepass(self):
3772 try:
3773 self.encode('', 'surrogatepass')
3774 except ValueError as exc:
3775 if str(exc) == 'unsupported error handler':
3776 self.skipTest(f"{self.ENCODING!r} encoder doesn't support "
3777 f"surrogatepass error handler")
3778 else:
3779 raise
3780
3781 self.check_encode_strings("surrogatepass")
3782
3783 def test_encode_unsupported_error_handler(self):
3784 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