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

Method test_decoder

Lib/test/test_io.py:2824–2833  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2822 ]
2823
2824 def test_decoder(self):
2825 # Try a few one-shot test cases.
2826 for input, eof, output in self.test_cases:
2827 d = StatefulIncrementalDecoder()
2828 self.assertEqual(d.decode(input, eof), output)
2829
2830 # Also test an unfinished decode, followed by forcing EOF.
2831 d = StatefulIncrementalDecoder()
2832 self.assertEqual(d.decode(b'oiabcd'), '')
2833 self.assertEqual(d.decode(b'', 1), 'abcd.')
2834
2835class TextIOWrapperTest(unittest.TestCase):
2836

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected