moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
unittest_cartesian_limits_aggregator.test.py
Go to the documentation of this file.
1import launch_testing
2import os
3import sys
4import pytest
5import unittest
6
7from launch import LaunchDescription
8from launch_ros.actions import Node
9from launch_testing.util import KeepAliveProc
10
11sys.path.append(os.path.dirname(__file__))
12from common_parameters import load_yaml
13
14
15@pytest.mark.rostest
17 cartesian_limits_yaml = load_yaml(
18 "pilz_industrial_motion_planner",
19 "config/unittest_cartesian_limits_aggregator.yaml",
20 )
21
22 # run test
23 unittest_cartesian_limits_aggregator = Node(
24 package="pilz_industrial_motion_planner",
25 executable="unittest_cartesian_limits_aggregator",
26 name="unittest_cartesian_limits_aggregator",
27 parameters=[
28 cartesian_limits_yaml,
29 ],
30 output="screen",
31 )
32 return (
33 LaunchDescription(
34 [
35 unittest_cartesian_limits_aggregator,
36 KeepAliveProc(),
37 launch_testing.actions.ReadyToTest(),
38 ]
39 ),
40 {"unittest_cartesian_limits_aggregator": unittest_cartesian_limits_aggregator},
41 )
42
43
44class TestTerminatingProcessStops(unittest.TestCase):
45 def test_gtest_run_complete(self, proc_info, unittest_cartesian_limits_aggregator):
46 proc_info.assertWaitForShutdown(
47 process=unittest_cartesian_limits_aggregator, timeout=4000.0
48 )
49
50
51@launch_testing.post_shutdown_test()
52class TestOutcome(unittest.TestCase):
53 def test_exit_codes(self, proc_info, unittest_cartesian_limits_aggregator):
54 launch_testing.asserts.assertExitCodes(
55 proc_info, process=unittest_cartesian_limits_aggregator
56 )
test_exit_codes(self, proc_info, unittest_cartesian_limits_aggregator)