'Compare expected output to actual output and report result.'

def __call__(self, file, config):

    cfg_section = config.get_section(file)
    if config.get(cfg_section, 'skip'):
        raise nose.plugins.skip.SkipTest('Test    skipped    per    config.')
    input_file = (file + config.get(cfg_section, 'input_ext'))
    with codecs.open(input_file, encoding='utf-8') as f:
        input = f.read()
    output_file = (file + config.get(cfg_section, 'output_ext'))
    with codecs.open(output_file, encoding='utf-8') as f:
        expected_output = f.read().replace('\r\n', '\n')
    output = markdown.markdown(input, **config.get_args(file))
    if (tidylib and config.get(cfg_section, 'normalize')):
        expected_output = normalize(expected_output)
        output = normalize(output)
    elif config.get(cfg_section, 'normalize'):
        raise nose.plugins.skip.SkipTest('Test    skipped.    Tidylib    not    available    on    system.')
    diff = [l for l in difflib.unified_diff(expected_output.splitlines(True), output.splitlines(True), output_file, 'actual_output.html', n=3)]
    if diff:
        raise MarkdownSyntaxError(('Output    from    "%s"    failed    to    match    expected    output.\n\n%s' % (input_file, ''.join(diff))))
