necst.utils.ros_thread¶
- class spinning(node=[], *, executor=None, n_thread=1)[source]¶
Bases:
object
Run tests with spinning some nodes.
The implementation is inspired by: https://github.com/ros2/system_tests/blob/rolling/test_cli/test/utils.py#L77
Examples
>>> with spinning(node) as e: ... assert my_node.subscribed_parameter is not None
- Parameters
node (Union[Node, Sequence[Node]]) –
executor (Optional[Executor]) –
n_thread (int) –