'Asserts that a check of the given lines with the given local bear
either yields or does not yield any results.
:param local_bear:       The local bear to check with.
:param lines:            The lines to check. (List of strings)
:param filename:         The filename, if it matters.
:param valid:            Whether the lines are valid or not.
:param force_linebreaks: Whether to append newlines at each line
if needed. (Bears expect a \n for every line)
:param create_tempfile:  Whether to save lines in tempfile if needed.
:param tempfile_kwargs:  Kwargs passed to tempfile.mkstemp().'

def check_validity(self, local_bear, lines, filename=None, valid=True, force_linebreaks=True, create_tempfile=True, tempfile_kwargs={}, settings={}):

    if valid:
        self.check_results(local_bear, lines, results=[], filename=filename, check_order=True, force_linebreaks=force_linebreaks, create_tempfile=create_tempfile, tempfile_kwargs=tempfile_kwargs, settings=settings)
    else:
        return self.check_invalidity(local_bear, lines, filename=filename, force_linebreaks=force_linebreaks, create_tempfile=create_tempfile, tempfile_kwargs=tempfile_kwargs, settings=settings)
