예제 #1
0
def test_flake8():
    rc, errors = main_with_errors(argv=[])
    assert rc == 0, \
        'Found %d code style errors / warnings:\n' % len(errors) + \
        '\n'.join(errors)
예제 #2
0
def test_flake8():
    excluded = ['cmakelint.py']
    rc, errors = main_with_errors(argv=['--exclude'] + excluded)
    assert rc == 0, \
        'Found %d code style errors / warnings:\n' % len(errors) + \
        '\n'.join(errors)
예제 #3
0
def test_flake8():
    # Test is called from package root
    rc, errors = main_with_errors(argv=['.'])
    assert rc == 0, \
        'Found %d code style errors / warnings:\n' % len(errors) + \
        '\n'.join(errors)
예제 #4
0
def test_flake8():
    """Run flake8 on the package."""
    return_code, errors = main_with_errors(argv=["--config", ".flake8"])
    assert (  # nosec
        return_code == 0
    ), f"Found {len(errors)} code style errors / warnings:\n\n".join(errors)
예제 #5
0
def test_flake8():
    """Run flake8 on the package."""
    return_code, errors = main_with_errors(argv=["--config", ".flake8"])
    assert return_code == 0, "Found %d code style errors / warnings:\n" % len(  # nosec
        errors) + "\n".join(errors)