def test_flake8(): rc, errors = main_with_errors(argv=[]) assert rc == 0, \ 'Found %d code style errors / warnings:\n' % len(errors) + \ '\n'.join(errors)
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)
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)
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)
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)