예제 #1
0
    def test_qos_profile_only_constructor(self):
        c_qos_profile = _rclpy.rmw_qos_profile_t.predefined('qos_profile_default')
        test_qos_profile = QoSProfile(**c_qos_profile.to_dict())

        info_for_ref = TopicEndpointInfo()
        info_for_ref.qos_profile = test_qos_profile

        info_from_ctor = TopicEndpointInfo(qos_profile=test_qos_profile)

        self.assertEqual(info_for_ref, info_from_ctor)
        self.assertEqual(test_qos_profile, info_from_ctor.qos_profile)
예제 #2
0
    def test_qos_profile_only_constructor(self):
        test_qos_profile = QoSProfile(
            **_rclpy.rclpy_get_rmw_qos_profile('qos_profile_default'))

        info_for_ref = TopicEndpointInfo()
        info_for_ref.qos_profile = test_qos_profile

        info_from_ctor = TopicEndpointInfo(qos_profile=test_qos_profile)

        self.assertEqual(info_for_ref, info_from_ctor)
        self.assertEqual(test_qos_profile, info_from_ctor.qos_profile)