(self)
| 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 | |
| 2835 | class TextIOWrapperTest(unittest.TestCase): |
| 2836 |
nothing calls this directly
no test coverage detected