diff --git a/ros2trace_analysis/package.xml b/ros2trace_analysis/package.xml index 2a3ebdf..47a2a53 100644 --- a/ros2trace_analysis/package.xml +++ b/ros2trace_analysis/package.xml @@ -13,6 +13,7 @@ ament_copyright ament_flake8 + ament_mypy ament_pep257 ament_xmllint python3-pytest diff --git a/ros2trace_analysis/test/test_mypy.py b/ros2trace_analysis/test/test_mypy.py new file mode 100644 index 0000000..331a3b8 --- /dev/null +++ b/ros2trace_analysis/test/test_mypy.py @@ -0,0 +1,22 @@ +# Copyright 2019 Canonical Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ament_mypy.main import main +import pytest + + +@pytest.mark.mypy +@pytest.mark.linter +def test_mypy(): + assert main(argv=[]) == 0, 'Found errors' diff --git a/tracetools_analysis/package.xml b/tracetools_analysis/package.xml index 8bffec9..d9145b7 100644 --- a/tracetools_analysis/package.xml +++ b/tracetools_analysis/package.xml @@ -15,6 +15,7 @@ ament_copyright ament_flake8 + ament_mypy ament_pep257 ament_xmllint python3-pytest diff --git a/tracetools_analysis/test/test_mypy.py b/tracetools_analysis/test/test_mypy.py new file mode 100644 index 0000000..331a3b8 --- /dev/null +++ b/tracetools_analysis/test/test_mypy.py @@ -0,0 +1,22 @@ +# Copyright 2019 Canonical Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ament_mypy.main import main +import pytest + + +@pytest.mark.mypy +@pytest.mark.linter +def test_mypy(): + assert main(argv=[]) == 0, 'Found errors'