Beispiel #1
0
def pep8(dsc, analysis):
    run_command(["dpkg-source", "-x", dsc, "source"])
    with cd('source'):
        out, err, ret = run_command(['pep8', '.'])
        failed = ret != 0

        for issue in parse_pep8(out.splitlines()):
            analysis.results.append(issue)

        return (analysis, out, failed)
Beispiel #2
0
def pep8(dsc, analysis):
    run_command(["dpkg-source", "-x", dsc, "source"])
    with cd('source'):
        out, err, ret = run_command(['pep8', '.'])
        failed = ret != 0

        for issue in parse_pep8(out.splitlines()):
            analysis.results.append(issue)

        return (analysis, out, failed)
Beispiel #3
0
def test_strings():
    for string, code in STRINGS:
        issue = next(parse_pep8([string]))
        assert issue.testid == code
Beispiel #4
0
def test_strings():
    for string, code in STRINGS:
        issue = next(parse_pep8([string]))
        assert issue.testid == code