Port execution tests to launch_pytest #749
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our tests currently have some redundant parts like launch descriptions, service interfaces and initialization code. Before working on more tests i think we should clean that up and make our current tests more maintainable in the process. This should result in the following tasks:
robot_launch_descriptions
so they can be resued among all tests.unittest
initialization structure.This also enables easily adding more paremetrization options (like testing all robot models for future moveit tests).
I decided to use
logging
for all test output instead of (as previously) using the node logger. This allows us to only show logging output from our tests or from the tested ROS nodes based on pytest arguments.I am not quite happy with having to include
*
fromrobot_launch_descriptions
in every test file, but i could not find a way to use these launch fixtures without this that did not result inScopeError
s. The tests also always show a warningWarning: There is no current event loop
at the end for me that i don't quite understand yet, but the tests still seem to work fine for me.