(self)
| 3840 | self.assertEqual(''.join([il for il, n in imt]), ''.join(om)) |
| 3841 | |
| 3842 | def test_push_random(self): |
| 3843 | from email.feedparser import BufferedSubFile, NeedMoreData |
| 3844 | |
| 3845 | n = 10000 |
| 3846 | chunksize = 5 |
| 3847 | chars = 'abcd \t\r\n' |
| 3848 | |
| 3849 | s = ''.join(choice(chars) for i in range(n)) + '\n' |
| 3850 | target = s.splitlines(True) |
| 3851 | |
| 3852 | bsf = BufferedSubFile() |
| 3853 | lines = [] |
| 3854 | for i in range(0, len(s), chunksize): |
| 3855 | chunk = s[i:i+chunksize] |
| 3856 | bsf.push(chunk) |
| 3857 | lines.extend(iter(bsf.readline, NeedMoreData)) |
| 3858 | self.assertEqual(lines, target) |
| 3859 | |
| 3860 | |
| 3861 | class TestFeedParsers(TestEmailBase): |
nothing calls this directly
no test coverage detected