-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executor.add_node() returns a bool #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -230,6 +230,12 @@ def __await__(self): | |||
rclpy.spin_once(self.node, timeout_sec=0) | |||
self.assertTrue(did_return) | |||
|
|||
def test_executor_add_node(self): | |||
self.assertIsNotNone(self.node.handle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this matches the style in this file but in general we should use a plain assert instead (the recommended way with pytest
). Nothing needs to happen for this patch though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Roger. I'll make sure to use a plain assert
in the future.
The documentation for
executor.add_node()
says it returnsTrue
if the node was added; however it currently just returnsNone
. This fixes the function, and also makes it so the guard condition to rebuild the waitset is only triggered if the node really was added.