def test_call_later(self): node = Node("TestNode2") def callback(): self.assertTrue(True) node.stop() node.add_delayed_callback(100, callback) node.start() self.assertTrue(True)
def __init__(self, name): Node.__init__(self, name) self.publisher = self.add_publisher("proto.pub.topic") self.repeater = self.add_repeater(1000, self.callback) self.count = 0
def __init__(self, name): Node.__init__(self, name) self.reply_server = self.add_reply_server("rpc.topic", self.request_callback)
def __init__(self, name): Node.__init__(self, name) self.request_client = self.add_request_client("rpc.topic", self.connect_handler) # self.repeater = self.add_repeater(1000, self.request_sender) self.counter = 0
def test_start_stop(self): node = Node("TestNode") self.assertIsNotNone(node.logger) node.loop.call_later(0.2, node.stop) node.start() self.assertTrue(True)