diff --git a/test_launch_ros/test/test_launch_ros/actions/test_set_parameter.py b/test_launch_ros/test/test_launch_ros/actions/test_set_parameter.py index ddf866f7..1c906092 100644 --- a/test_launch_ros/test/test_launch_ros/actions/test_set_parameter.py +++ b/test_launch_ros/test/test_launch_ros/actions/test_set_parameter.py @@ -111,7 +111,7 @@ def test_set_param_with_node(): set_param.execute(lc) node._perform_substitutions(lc) actual_command = [perform_substitutions(lc, item) for item in - node.cmd if type(item[0]) == TextSubstitution] + node.cmd if isinstance(item[0], TextSubstitution)] assert actual_command.count('--params-file') == 1 assert actual_command.count('-p') == 1 diff --git a/test_launch_ros/test/test_launch_ros/actions/test_set_parameters_from_file.py b/test_launch_ros/test/test_launch_ros/actions/test_set_parameters_from_file.py index acb3a5f2..e3cf4573 100644 --- a/test_launch_ros/test/test_launch_ros/actions/test_set_parameters_from_file.py +++ b/test_launch_ros/test/test_launch_ros/actions/test_set_parameters_from_file.py @@ -78,10 +78,10 @@ def test_set_param_with_node(): node_2._perform_substitutions(lc) actual_command_1 = [perform_substitutions(lc, item) for item in - node_1.cmd if type(item[0]) == TextSubstitution] + node_1.cmd if isinstance(item[0], TextSubstitution)] actual_command_2 = [perform_substitutions(lc, item) for item in - node_2.cmd if type(item[0]) == TextSubstitution] + node_2.cmd if isinstance(item[0], TextSubstitution)] assert actual_command_1[3] == '--params-file' assert os.path.isfile(actual_command_1[4])