def test_overlongWrite(self):
        """
        The literal returns any left over L{bytes} when given more
        data than the literal requires.
        """
        data = b"completeleftover"
        literal = self.literalFactory(len(b"complete"), self.deferred)

        leftover = literal.write(data)

        self.assertEqual(leftover, b"leftover")

        The literal returns any left over L{bytes} when given more
        data than the literal requires.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py