def test_invalidIdListParser(self):
        """
        Trying to parse an invalid representation of a sequence range raises an
        L{IllegalIdentifierError}.
        """
        inputs = [
            b'*:*',
            b'foo',
            b'4:',
            b'bar:5'
        ]

        for input in inputs:
            self.assertRaises(imap4.IllegalIdentifierError,
                              imap4.parseIdList, input, 12345)

        Trying to parse an invalid representation of a sequence range raises an
        L{IllegalIdentifierError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py