def map_log(values):
    """
    Map the values generated with the hypothesis-ros log strategy to a rospy header type.
    """
    if not isinstance(values, _Log):
        raise TypeError('Wrong type. Use appropriate hypothesis-ros type.')
    ros_log = Log()
    ros_log.header = values.header
    ros_log.level = values.level
    ros_log.name = values.name
    ros_log.msg = values.msg
    ros_log.file = values.file
    ros_log.function = values.function
    ros_log.topics = values.topics

    return ros_log
示例#2
0
 def test_fuzz_log_message(self, header):
     log = Log()
     log.header = header
     self.pub.publish(log)