Update test_flake8.py files

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
Christophe Bedard 2020-10-11 11:40:43 -04:00
parent df5c4c9fd3
commit 7bb3be8407
2 changed files with 10 additions and 6 deletions

View file

@ -12,12 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from ament_flake8.main import main from ament_flake8.main import main_with_errors
import pytest import pytest
@pytest.mark.flake8 @pytest.mark.flake8
@pytest.mark.linter @pytest.mark.linter
def test_flake8(): def test_flake8():
rc = main(argv=[]) rc, errors = main_with_errors(argv=[])
assert rc == 0, 'Found errors' assert rc == 0, \
'Found %d code style errors / warnings:\n' % len(errors) + \
'\n'.join(errors)

View file

@ -12,12 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from ament_flake8.main import main from ament_flake8.main import main_with_errors
import pytest import pytest
@pytest.mark.flake8 @pytest.mark.flake8
@pytest.mark.linter @pytest.mark.linter
def test_flake8(): def test_flake8():
rc = main(argv=[]) rc, errors = main_with_errors(argv=[])
assert rc == 0, 'Found errors' assert rc == 0, \
'Found %d code style errors / warnings:\n' % len(errors) + \
'\n'.join(errors)