I have a large number of tests in ROS2 in Python I would like to write that are essentially
Publish a message
Subscribe and do something
Check what happens during the "do something"
I can do this by creating the publisher and subscriber in the same piece of code. However, it's closer to what happens "for real" if I publish in one process and subscribe in another. But that doesn't fit in well with pytest. Is there a ROS2 "way" to do this - something like the equivalent of ROS1's rostest?
Thanks!