def test_fetchSpecificPartial(self):
        """
        L{IMAP4Client.fetchSpecific}, when passed C{offset} and C{length},
        sends a partial content request (like I{BODY[TEXT]<offset.length>}).
        It returns a L{Deferred} which fires with a C{dict} mapping message
        sequence numbers to C{list}s of corresponding message data given by the
        server's response.
        """
        d = self.client.fetchSpecific(
            '9', headerType='TEXT', offset=17, length=3)
        self.assertEqual(
            self.transport.value(), b'0001 FETCH 9 BODY[TEXT]<17.3>\r\n')
        self.client.lineReceived(b'* 9 FETCH (BODY[TEXT]<17> "foo")')
        self.client.lineReceived(b'0001 OK FETCH completed')
        self.assertEqual(
            self.successResultOf(d),
            {9: [['BODY', ['TEXT'], '<17>', 'foo']]})

        L{IMAP4Client.fetchSpecific}, when passed C{offset} and C{length},
        sends a partial content request (like I{BODY[TEXT]<offset.length>}).
        It returns a L{Deferred} which fires with a C{dict} mapping message
        sequence numbers to C{list}s of corresponding message data given by the
        server's response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py