Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of -r/--remap flags where appropriate. #384

Merged
merged 1 commit into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
43 changes: 26 additions & 17 deletions test_cli/test/test_params_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def test_bool_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=bool_params'
'--remap',
'__node:=bool_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -96,8 +97,9 @@ def test_integer_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=int_params'
'--remap',
'__node:=int_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -121,8 +123,9 @@ def test_double_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=double_params'
'--remap',
'__node:=double_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -146,8 +149,9 @@ def test_string_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=str_params'
'--remap',
'__node:=str_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -174,8 +178,9 @@ def test_bool_array_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=ba_params'
'--remap',
'__node:=ba_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -199,8 +204,9 @@ def test_integer_array_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=ia_params'
'--remap',
'__node:=ia_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -224,8 +230,9 @@ def test_double_array_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=da_params'
'--remap',
'__node:=da_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand All @@ -249,8 +256,9 @@ def test_string_array_params(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'__params:=' + yaml_file,
'__node:=sa_params'
'--remap',
'__node:=sa_params',
'__params:=' + yaml_file
)

with HelperCommand(command):
Expand Down Expand Up @@ -282,9 +290,10 @@ def test_multiple_parameter_files(node_fixture):
command = (
node_fixture['executable'],
'--ros-args',
'--remap',
'__node:=multi_params'
'__params:=' + first_yaml_file,
'__params:=' + second_yaml_file,
'__node:=multi_params'
)
with HelperCommand(command):
resp = get_params(node_fixture['node'], 'multi_params', ['i1', 'i2', 'i3'])
Expand Down
2 changes: 1 addition & 1 deletion test_cli_remapping/test/test_cli_remapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def generate_test_description(executable, ready_fn):
random.randint(0, 9999), time.strftime('%H_%M_%S', time.gmtime()))
launch_description.add_action(
ExecuteProcess(
cmd=command + ['--ros-args', cli_argument.format(**locals())],
cmd=command + ['--ros-args', '--remap', cli_argument.format(**locals())],
name='name_maker_' + replacement_name, env=env
)
)
Expand Down