(self)
| 613 | self.assertEqual(data, [b'1', b'9']) |
| 614 | |
| 615 | def test_idle_delayed_packet(self): |
| 616 | client, _ = self._setup(IdleCmdDelayedPacketHandler) |
| 617 | client.login('user', 'pass') |
| 618 | # If our readline() implementation fails to preserve line fragments |
| 619 | # when idle timeouts trigger, a response spanning delayed packets |
| 620 | # can be corrupted, leaving the protocol stream in a bad state. |
| 621 | try: |
| 622 | with client.idle(0.5) as idler: |
| 623 | self.assertRaises(StopIteration, next, idler) |
| 624 | except client.abort as err: |
| 625 | self.fail('multi-packet response was corrupted by idle timeout') |
| 626 | |
| 627 | def test_login(self): |
| 628 | client, _ = self._setup(SimpleIMAPHandler) |
nothing calls this directly
no test coverage detected