def test_ignoresUnparsableKeys(self):
        """
        L{checkers.readAuthorizedKeyFile} does not raise an exception
        when a key fails to parse (raises a
        L{twisted.conch.ssh.keys.BadKeyError}), but rather just keeps going
        """
        def failOnSome(line):
            if line.startswith(b'f'):
                raise keys.BadKeyError('failed to parse')
            return line

        fileobj = BytesIO(b'failed key\ngood key')
        result = checkers.readAuthorizedKeyFile(fileobj,
                                                parseKey=failOnSome)
        self.assertEqual([b'good key'], list(result))

        L{checkers.readAuthorizedKeyFile} does not raise an exception
        when a key fails to parse (raises a
        L{twisted.conch.ssh.keys.BadKeyError}), but rather just keeps going
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_checkers.py