Skip to content

Commit

Permalink
Remove ready_fn, self.proc_info
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Baughman <pete.baughman@apex.ai>
  • Loading branch information
Pete Baughman committed Oct 22, 2019
1 parent 1450f9c commit 169b864
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test_ros2cli/test/test_process_output_customizable.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import unittest

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction
from launch.actions import TimerAction
from launch.substitutions import LaunchConfiguration

import launch_testing
import launch_testing.actions
import launch_testing.asserts

sys.path.append(os.path.dirname(__file__))
Expand All @@ -32,7 +32,7 @@ from @TEST_CONFIGURATION_FILE@ import configs # noqa


@launch_testing.parametrize('config', configs)
def generate_test_description(config, ready_fn):
def generate_test_description(config):
cmd = ['ros2', config.command]
cmd.extend(config.arguments)
process_under_test = ExecuteProcess(
Expand All @@ -48,17 +48,17 @@ def generate_test_description(config, ready_fn):
))
launch_description = LaunchDescription(actions)
launch_description.add_action(
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
)
msgs = config.expected_output
return launch_description, locals()


class TestCommandFinishesInAFiniteAmountOfTime(unittest.TestCase):

def @TEST_NAME@(self, process_under_test):
def @TEST_NAME@(self, process_under_test, proc_info):
"""Test that ros2 command finished in a finite amount of time."""
self.proc_info.assertWaitForShutdown(process=process_under_test, timeout=60)
proc_info.assertWaitForShutdown(process=process_under_test, timeout=60)


@launch_testing.post_shutdown_test()
Expand Down

0 comments on commit 169b864

Please sign in to comment.