Collecting useful helper functions here until they can find a proper home
Toggle line numbers
1 def is_publishing(node_name, topic_name):
2 topics_published = [info(s).name for s in info(nodes[node_name]).subs] # <-- this one was a bit tricky to work out
3 return True in [s.find(topic_name) >= 0 for s in topics_published]
credit: Patrick Bouffard
credit: Patrick Bouffard
To be implemented
Toggle line numbers
1 wait_for(lambda x: x.fieldname > 42, '/some/topic')
2 do_cool_stuff()