MCPcopy Create free account
hub / github.com/python/cpython / test_idle_burst

Method test_idle_burst

Lib/test/test_imaplib.py:597–606  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

595 self.assertEqual(data[1], b'9')
596
597 def test_idle_burst(self):
598 client, _ = self._setup(IdleCmdHandler)
599 client.login('user', 'pass')
600 # burst() should yield immediately available responses
601 with client.idle() as idler:
602 batch = list(idler.burst())
603 self.assertEqual(len(batch), 4)
604 # burst() should not have consumed later responses
605 _, data = client.response('RECENT')
606 self.assertEqual(data, [b'1', b'9'])
607
608 def test_idle_delayed_packet(self):
609 client, _ = self._setup(IdleCmdDelayedPacketHandler)

Callers

nothing calls this directly

Calls 7

_setupMethod · 0.95
listClass · 0.85
idleMethod · 0.80
burstMethod · 0.80
responseMethod · 0.80
loginMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected