-
Notifications
You must be signed in to change notification settings - Fork 69
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
Move pytest entrypoints to own module #278
Conversation
This branch is on the commit just before #276, so windows debug CI should show if the issue is fixed or not. Windows debug: build / test all Edit: But I forgot CI merges with master - trying again. |
150431c
to
29a8bf2
Compare
The second commit also reverts #276 for testing the approach purposes |
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.
Besides the test failure, the change LGTM.
Do you know if isolating pytest hooks like this is a best practice documented anywhere?
Also, should we consider doing something similar for launch_testing?
I've never heard of it before. IIUC this PR is solving something specific to merged workspaces and how we run CI, and not implementing a general Python workflow. In our CI all the packages are built before any tests are run, which installs them into the install space. If that install space is merged then when tests are run all packages have access to all packages that have been built. Even the lowest level packages (like
Maybe, but I haven't figured out why the |
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!
The only weird thing is that the file called hooks.py
does not contain the definition of any pytest hook now.
(IIRC pytest_launch_collect_makemodule
and pytest_configure
are called "hooks" in pytest parlance)
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
29a8bf2
to
5b2b52d
Compare
Rebased to include just the fix, and not a revert revert of #274 |
I'm not sure why we are seeing those qt_dotgraph test failures. That package does not transitively depend on launch_ros...
|
Alternative to #277
Attempts to fix ros2/rclpy#831
This moves the pytest entrypoints to a separate module, and makes them import anything ROS specific as late as possible. This should prevent packages like
ament_package
importing downstream packages like rclpy.