def test_concurrentRetrieves(self):
        """
        Issue three retrieve calls immediately without waiting for any to
        succeed and make sure they all do succeed eventually.
        """
        p, t = setUp()
        messages = [
            p.retrieve(i).addCallback(
                self.assertEqual,
                [b"First line of " + intToBytes(i + 1) + b".",
                 b"Second line of " + intToBytes(i + 1) + b"."])
            for i
            in range(3)]

        for i in range(1, 4):
            self.assertEqual(t.value(), b"RETR " + intToBytes(i) + b"\r\n")
            t.clear()
            p.dataReceived(b"+OK 2 lines on the way\r\n")
            p.dataReceived(b"First line of " + intToBytes(i) + b".\r\n")
            p.dataReceived(b"Second line of " + intToBytes(i) + b".\r\n")
            self.assertEqual(t.value(), b"")
            p.dataReceived(b".\r\n")

        return defer.DeferredList(messages, fireOnOneErrback=True)

        Issue three retrieve calls immediately without waiting for any to
        succeed and make sure they all do succeed eventually.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_pop3client.py