Skip to content

Commit

Permalink
add pytest markers to linter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 1, 2018
1 parent 690fab5 commit e93ce3d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
3 changes: 3 additions & 0 deletions launch/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
# limitations under the License.

from ament_flake8.main import main
import pytest


@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
rc = main(argv=[])
assert rc == 0, 'Found errors'
3 changes: 3 additions & 0 deletions launch/test/test_pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
# limitations under the License.

from ament_pep257.main import main
import pytest


@pytest.mark.linter
@pytest.mark.pep257
def test_pep257():
rc = main(argv=[])
assert rc == 0, 'Found code style errors / warnings'
1 change: 1 addition & 0 deletions launch_testing/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>launch</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
3 changes: 3 additions & 0 deletions launch_testing/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
# limitations under the License.

from ament_flake8.main import main
import pytest


@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
rc = main(argv=[])
assert rc == 0, 'Found errors'
3 changes: 3 additions & 0 deletions launch_testing/test/test_pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
# limitations under the License.

from ament_pep257.main import main
import pytest


@pytest.mark.linter
@pytest.mark.pep257
def test_pep257():
rc = main(argv=[])
assert rc == 0, 'Found code style errors / warnings'

0 comments on commit e93ce3d

Please sign in to comment.