'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 test_ignoresUnparsableKeys(self):

    def failOnSome(line):
        if line.startswith('f'):
            raise keys.BadKeyError('failed    to    parse')
        return line
    fileobj = BytesIO('failed    key\ngood    key')
    result = checkers.readAuthorizedKeyFile(fileobj, parseKey=failOnSome)
    self.assertEqual(['good    key'], list(result))
