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

Method _check_decode

Lib/test/test_io.py:4262–4267  ·  view source on GitHub ↗
(b, s, **kwargs)

Source from the content-addressed store, hash-verified

4260 def check_newline_decoding_utf8(self, decoder):
4261 # UTF-8 specific tests for a newline decoder
4262 def _check_decode(b, s, **kwargs):
4263 # We exercise getstate() / setstate() as well as decode()
4264 state = decoder.getstate()
4265 self.assertEqual(decoder.decode(b, **kwargs), s)
4266 decoder.setstate(state)
4267 self.assertEqual(decoder.decode(b, **kwargs), s)
4268
4269 _check_decode(b'\xe8\xa2\x88', "\u8888")
4270

Callers

nothing calls this directly

Calls 4

getstateMethod · 0.45
assertEqualMethod · 0.45
decodeMethod · 0.45
setstateMethod · 0.45

Tested by

no test coverage detected