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

Method test_decoder

Lib/test/test_io/test_textio.py:164–173  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162 ]
163
164 def test_decoder(self):
165 # Try a few one-shot test cases.
166 for input, eof, output in self.test_cases:
167 d = StatefulIncrementalDecoder()
168 self.assertEqual(d.decode(input, eof), output)
169
170 # Also test an unfinished decode, followed by forcing EOF.
171 d = StatefulIncrementalDecoder()
172 self.assertEqual(d.decode(b'oiabcd'), '')
173 self.assertEqual(d.decode(b'', 1), 'abcd.')
174
175class TextIOWrapperTest:
176

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected