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