Merge branch '39-update-test-flake8-files' into 'master'

Update test_flake8.py files

Closes #39

See merge request micro-ROS/ros_tracing/tracetools_analysis!85
This commit is contained in:
Christophe Bedard 2020-10-11 15:46:38 +00:00
commit fd4f5e8140
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)