Skip to content

Commit

Permalink
extend instead of assign expanded_parameter_arguments in tests.
Browse files Browse the repository at this point in the history
Distro A, OPSEC #4584. You may have additional rights; please see https://rosmilitary.org/faq/?category=ros-2-license

Signed-off-by: matthew.lanting <mlanting@dcscorp.com>
  • Loading branch information
mlanting committed Apr 11, 2022
1 parent c3436aa commit fcfaf43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test_launch_ros/test/test_launch_ros/actions/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ def test_launch_node_with_parameter_descriptions(self):
)
self._assert_launch_no_errors([node_action])

expanded_parameter_arguments = []
for node in node_action.ros_exec.nodes:
expanded_parameter_arguments = node.expanded_parameter_arguments
expanded_parameter_arguments.extend(node.expanded_parameter_arguments)
assert len(expanded_parameter_arguments) == 5
parameters = []
for item, is_file in expanded_parameter_arguments:
Expand Down Expand Up @@ -224,8 +225,9 @@ def test_launch_node_with_parameter_dict(self):
self._assert_launch_no_errors([node_action])

# Check the expanded parameters (will be written to a file).
expanded_parameter_arguments = []
for node in node_action.ros_exec.nodes:
expanded_parameter_arguments = node.expanded_parameter_arguments
expanded_parameter_arguments.extend(node.expanded_parameter_arguments)
assert len(expanded_parameter_arguments) == 1
file_path, is_file = expanded_parameter_arguments[0]
assert is_file
Expand Down

0 comments on commit fcfaf43

Please sign in to comment.