-
Notifications
You must be signed in to change notification settings - Fork 139
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
wait_for_ouput() repr includes actual text #408
Conversation
This makes `wait_for_output()` return an object that still evaluates as a bool, but when `repr()`'d it includes the actual text. This will help debug a few test failures on the build farm caused by expected output not being seeing. Signed-off-by: Shane Loretz<sloretz@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
54a2b39
to
0d077f6
Compare
Here's what this looks like in the pytest output. It shows most of the actual output in the traceback, not all because
|
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.
Looks reasonable to me. I guess this should be unlikely to break downstream usage, and the benefit outweighs the risk IMO.
@hidmic can you take a look?
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.
The assert
message still needs work, but this looks like an improvement to me too. LGTM
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
CI looks ok. Linux, Linux-aarch64, OSX only had a flake-8 failure, but the re-run of linux shows that was fixed by 9ce33de. Windows showed a flake8 failure plus build warning, but that warning also exists in the nightly. Merging. |
This makes
wait_for_output()
return an object that still evaluates asa bool, but when
repr()
'd it includes the actual text. This will helpdebug a few test failures on the build farm caused by expected output
not being seen.
@jacobperron review-requested because I would like to get this into foxy to help debug test failures on the build farm, though I could see how this could be considered changing an API. I think it's safe because the returned object still evaluates
True
asFalse
. Thoughts?