def test_partialWrite(self):
        """
        L{imap4.WriteBuffer} buffers writes that are smaller than its
        buffer size.
        """
        buf = imap4.WriteBuffer(self.transport)
        data = b'x' * buf.bufferSize

        buf.write(data)

        self.assertFalse(self.transport.value())

        L{imap4.WriteBuffer} buffers writes that are smaller than its
        buffer size.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py