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

Remove ready_fn, self.proc_info #376

Merged
merged 1 commit into from
Mar 6, 2020
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
6 changes: 3 additions & 3 deletions ros2action/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand All @@ -37,7 +37,7 @@

@pytest.mark.rostest
@launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations())
def generate_test_description(rmw_implementation, ready_fn):
def generate_test_description(rmw_implementation):
path_to_action_server_executable = os.path.join(
os.path.dirname(__file__), 'fixtures', 'fibonacci_action_server.py'
)
Expand All @@ -55,7 +55,7 @@ def generate_test_description(rmw_implementation, ready_fn):
cmd=[sys.executable, path_to_action_server_executable],
additional_env={'RMW_IMPLEMENTATION': rmw_implementation}
),
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
],
additional_env={'RMW_IMPLEMENTATION': rmw_implementation}
)
Expand Down
6 changes: 3 additions & 3 deletions ros2interface/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand Down Expand Up @@ -54,8 +54,8 @@

@pytest.mark.rostest
@launch_testing.markers.keep_alive
def generate_test_description(ready_fn):
return LaunchDescription([OpaqueFunction(function=lambda context: ready_fn())])
def generate_test_description():
return LaunchDescription([launch_testing.actions.ReadyToTest()])


class TestROS2InterfaceCLI(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions ros2node/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

from launch_ros.actions import Node

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand All @@ -38,7 +38,7 @@

@pytest.mark.rostest
@launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations())
def generate_test_description(rmw_implementation, ready_fn):
def generate_test_description(rmw_implementation):
path_to_complex_node_script = os.path.join(
os.path.dirname(__file__), 'fixtures', 'complex_node.py'
)
Expand Down Expand Up @@ -66,7 +66,7 @@ def generate_test_description(rmw_implementation, ready_fn):
node_name='_hidden_complex_node',
additional_env=additional_env
),
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
],
additional_env=additional_env
)
Expand Down
6 changes: 3 additions & 3 deletions ros2pkg/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand All @@ -38,8 +38,8 @@

@pytest.mark.rostest
@launch_testing.markers.keep_alive
def generate_test_description(ready_fn):
return LaunchDescription([OpaqueFunction(function=lambda context: ready_fn())])
def generate_test_description():
return LaunchDescription([launch_testing.actions.ReadyToTest()])


class TestROS2PkgCLI(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions ros2service/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction
from launch_ros.actions import Node

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand Down Expand Up @@ -56,7 +56,7 @@ def get_echo_call_output(**kwargs):

@pytest.mark.rostest
@launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations())
def generate_test_description(rmw_implementation, ready_fn):
def generate_test_description(rmw_implementation):
path_to_echo_server_script = os.path.join(
os.path.dirname(__file__), 'fixtures', 'echo_server.py'
)
Expand Down Expand Up @@ -87,7 +87,7 @@ def generate_test_description(rmw_implementation, ready_fn):
remappings=[('echo', '_echo')],
additional_env=additional_env,
),
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
],
additional_env=additional_env
)
Expand Down
6 changes: 3 additions & 3 deletions ros2topic/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

from launch_ros.actions import Node

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand All @@ -39,7 +39,7 @@

@pytest.mark.rostest
@launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations())
def generate_test_description(rmw_implementation, ready_fn):
def generate_test_description(rmw_implementation):
path_to_fixtures = os.path.join(os.path.dirname(__file__), 'fixtures')
additional_env = {
'RMW_IMPLEMENTATION': rmw_implementation, 'PYTHONUNBUFFERED': '1'
Expand Down Expand Up @@ -132,7 +132,7 @@ def generate_test_description(rmw_implementation, ready_fn):
unbounded_sequences_repeater_node_action,
# Add stamped data publisher.
cmd_vel_controller_node_action,
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
],
additional_env=additional_env
)
Expand Down
6 changes: 3 additions & 3 deletions ros2topic/test/test_echo_pub.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import OpaqueFunction

import launch_testing
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import launch_testing.tools
Expand All @@ -42,7 +42,7 @@

@pytest.mark.rostest
@launch_testing.markers.keep_alive
def generate_test_description(ready_fn):
def generate_test_description():
return LaunchDescription([
# Always restart daemon to isolate tests.
ExecuteProcess(
Expand All @@ -53,7 +53,7 @@ def generate_test_description(ready_fn):
cmd=['ros2', 'daemon', 'start'],
name='daemon-start',
on_exit=[
OpaqueFunction(function=lambda context: ready_fn())
launch_testing.actions.ReadyToTest()
],
)
]
Expand Down