def test_parse_bad_test_requires():
    parsed = parse_log(os.path.join('test_data', 'bad_test_requires.log'))
    for pkg_name, grouped in parsed.items():
        parsed_test = log_parser.parse_test(grouped['test'])
        assert len(parsed_test['err']) > 0
        err = parsed_test['err'][0]
        assert 'No packages found' in err
def test_parse_bad_import():
    parsed = parse_log(os.path.join('test_data', 'bad_import.log'))
    assert len(parsed) == 1
    name = list(parsed.keys())[0]
    # this should be the analysis metapackage package
    assert 'analysis' in name
    parsed_test = log_parser.parse_test(parsed[name]['test'])
    # there should only be one error
    assert len(parsed_test['err']) == 1
    assert 'ImportError' in parsed_test['err'][0]