Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ python:
install:
- pip install -r requirements.dev.txt
- pip install -e .
# for now, we have to manually install any images needed for testing
- docker pull therobotcooperative/fetch
- docker pull therobotcooperative/husky
- docker pull therobotcooperative/turtlebot3-ros2
- docker pull therobotcooperative/turtlebot3
# see #337: flag potential twine issues before attempting to upload to PyPI
- python setup.py sdist
- python setup.py bdist_wheel
Expand Down
1 change: 1 addition & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ flake8-bugbear==20.1.4
pep8-naming==0.11.1
mypy==0.780
pytest==5.3.0
pytest-xdist==2.1.0
ptpython==2.0.6
tox==3.14.1
sphinx==2.4.4
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ deps =
commands =
flake8 src
mypy src
pytest -n auto

[mypy]
ignore_missing_imports = True
Expand Down
3 changes: 2 additions & 1 deletion test/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def test_database_from_paths(filesystem):
assert set(db) == {'angles', 'tf2', 'tf2_msgs', 'tf2_py', 'tf2_ros'}


@pytest.mark.skip(reason='ROS2 is not fully supported')
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_package_location_ros2(sut):
expected_paths = {'/ros_ws/install/pcl_conversions',
Expand Down Expand Up @@ -340,7 +341,7 @@ def test_package_location_ros2(sut):
'/ros_ws/install/action_msgs',
'/ros_ws/install/cartographer_ros_msgs',
'/ros_ws/install/message_filters',
'/ros_ws/install/turtlebot3_cartographer',
'/ros_ws/install/turtlebot3_cartographer',
'/ros_ws/install/ament_flake8',
'/ros_ws/install/dwb_controller',
'/ros_ws/install/nav2_dwb_controller',
Expand Down
14 changes: 4 additions & 10 deletions test/test_roslaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,25 @@ def test_remappings(sut):
assert set(state.publishers['/funkybits']) == {'/gazebo'}



@pytest.mark.skip(reason='ROS2 is not fully supported')
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_locate_with_package_ros2(sut):
actual_path = sut.ros2.launch.locate('cartographer.launch.py', package='turtlebot3_cartographer')
expected_path = '/ros_ws/src/turtlebot3/turtlebot3_cartographer/launch/cartographer.launch.py'
assert actual_path == expected_path


@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_locate_without_package_ros2(sut):
actual_path = sut.ros2.launch.locate('/ros_ws/src/turtlebot3/turtlebot3_cartographer/launch/cartographer.launch.py')
expected_path = '/ros_ws/src/turtlebot3/turtlebot3_cartographer/launch/cartographer.launch.py'
expected_path = '/ros_ws/install/turtlebot3_cartographer/share/launch/cartographer.launch.py'
assert actual_path == expected_path


@pytest.mark.skip(reason='ROS2 is not fully supported')
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_launch_ros2(sut):
actual_controller_command = sut.ros2.launch.launch('cartographer.launch.py', package='turtlebot3_cartographer').popen.args
expected_controller_command = 'ros2 launch turtlebot3_cartographer cartographer.launch.py'
assert actual_controller_command == expected_controller_command


@pytest.mark.skip(reason='ROS2 is not fully supported')
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_launch_with_full_path(sut):
actual_controller_command = sut.ros2.launch.launch('/ros_ws/src/turtlebot3/turtlebot3_cartographer/launch/cartographer.launch.py', package='turtlebot3_cartographer').popen.args
expected_controller_command = 'ros2 launch turtlebot3_cartographer cartographer.launch.py'
assert actual_controller_command == expected_controller_command

5 changes: 5 additions & 0 deletions test/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import dockerblade

@pytest.mark.skip(reason="skipping ROS2 tests")
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_state_publishers(sut):
sut.ros2.launch('simple.launch.py', package='launch')
Expand All @@ -21,6 +22,8 @@ def test_state_publishers(sut):
'/landmark_poses_list'})
assert actual_publishers == expected_publishers


@pytest.mark.skip(reason="skipping ROS2 tests")
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_state_subscribers(sut):
sut.ros2.launch('simple.launch.py', package='launch')
Expand All @@ -35,6 +38,8 @@ def test_state_subscribers(sut):
''})
assert actual_subscribers == expected_subscribers


@pytest.mark.skip(reason="skipping ROS2 tests")
@pytest.mark.parametrize('sut', ['turtlebot3-ros2'], indirect=True)
def test_state_services(sut):
sut.ros2.launch('simple.launch.py', package='launch')
Expand Down