51 self.assertEquals(
'foo', msg.data)
55 self.assertEquals(
'foo', msg.data)
65 s0 = rospy.Subscriber(
's', String, self.
callback)
67 timeout_t = time.time() + 20.
68 print(
"waiting for 20 seconds")
70 not rospy.is_shutdown()
and \
71 timeout_t > time.time():
74 self.failIf(timeout_t < time.time(),
"timeout exceeded")
75 self.failIf(rospy.is_shutdown(),
"node shutdown")
83 timeout_t = time.time() + 0.5
85 not rospy.is_shutdown()
and \
86 timeout_t > time.time():
90 if __name__ ==
'__main__':
92 rostest.run(PKG, NAME, TestLatch, sys.argv)
def callback_args(self, msg, i)