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