Skip to content

Fix Pytest 8/9 compatibility in launch_testing_ros hooks#540

Merged
ahcorde merged 1 commit intoros2:rollingfrom
mjcarroll:fix/pytest-compatibility
May 5, 2026
Merged

Fix Pytest 8/9 compatibility in launch_testing_ros hooks#540
ahcorde merged 1 commit intoros2:rollingfrom
mjcarroll:fix/pytest-compatibility

Conversation

@mjcarroll
Copy link
Copy Markdown
Member

@mjcarroll mjcarroll commented May 4, 2026

This PR fixes deprecated hook signatures in launch_testing_ros that cause failures in newer pytest versions (e.g. Pytest 9.0).

Related: ros2/launch#972

Rename deprecated path argument to module_path to avoid warnings and failures in newer pytest versions.

Assisted-by: Gemini CLI:2.0-Flash [run_shell_command, replace, git, gh]
Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
@mjcarroll mjcarroll force-pushed the fix/pytest-compatibility branch from 2789d11 to ba25d59 Compare May 4, 2026 22:28
@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: #540
Gist: https://gist.githubusercontent.com/mjcarroll/5ff5554879a8a93e0aa96fe9f236f822/raw/da48991c186988260bd2918d8e32800fb2b3a6ae/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest
TEST args: --packages-above launch_pytest
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19135

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: ros2/launch#972, #540
Gist: https://gist.githubusercontent.com/mjcarroll/a83f4accadea98cbb9fae33c730cee5e/raw/69cbe18f7e422c86ee1438f9fdfb58463534f592/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest
TEST args: --packages-above launch_pytest
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19137

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit 5ba9fa4 into ros2:rolling May 5, 2026
3 checks passed
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented May 5, 2026

https://github.com/Mergifyio backport lyrical

@mergify
Copy link
Copy Markdown

mergify Bot commented May 5, 2026

backport lyrical

✅ Backports have been created

Details

@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: ros2/launch#940, #540
Gist: https://gist.githubusercontent.com/mjcarroll/3e9f1028dc1c3f23fffc1fae497ea7cd/raw/c5e14052dd5c89c1a08ef6641f5f49a9bdff04ea/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest launch_yaml
TEST args: --packages-above launch_pytest launch_yaml
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19146

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: ros2/launch#940, #540
Gist: https://gist.githubusercontent.com/mjcarroll/9a7e129f47bcc544f9f8cc9d267c90ed/raw/c5e14052dd5c89c1a08ef6641f5f49a9bdff04ea/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest launch_yaml test_launch_ros
TEST args: --packages-above launch_pytest launch_yaml test_launch_ros
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19147

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

clalancette added a commit that referenced this pull request May 8, 2026
…) (#541)

* Fix Pytest 8/9 compatibility in launch_testing_ros hooks (#540)

Rename deprecated path argument to module_path to avoid warnings and failures in newer pytest versions.

Assisted-by: Gemini CLI:2.0-Flash [run_shell_command, replace, git, gh]

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
(cherry picked from commit 5ba9fa4)

* Fix launch_testing_ros so it works with pytest 7. (#543)

We need this compatibility because Windows pixi is
still using an older pytest.  This doesn't really
hurt anything either.

While we are in here, fix a pep257 warning that I noticed
in the tests.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

---------

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Michael Carroll <mjcarroll.oss@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants