Skip to content
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

Cast pathlib.Path to str inside normalize_to_list_of_substitutions. #806

Closed
wants to merge 1 commit into from

Conversation

Interpause
Copy link

@Interpause Interpause commented Nov 2, 2024

This resolves #805. More details can be found there.

After backporting the commit to humble, I have tested it to at least work on my launch files, allowing me to remove the str() cast.

Since this is my first time, I am not exactly sure how to run tests, but I think this means its good?

============================================================================================= test session starts =============================================================================================
platform linux -- Python 3.10.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /workspaces/project-name/thirdparty/launch/launch_pytest, configfile: pytest.ini
plugins: launch-pytest-3.6.1, launch-testing-3.6.1, ament-copyright-0.12.11, ament-xmllint-0.12.11, launch-testing-ros-0.19.7, ament-lint-0.12.11, ament-flake8-0.12.11, ament-mypy-0.12.11, ament-pep257-0.12.11, colcon-core-0.18.1, cov-3.0.0
collected 18 items                                                                                                                                                                                            

test/test_copyright.py .                                                                                                                                                                                [  5%]
test/test_flake8.py .                                                                                                                                                                                   [ 11%]
test/test_pep257.py .                                                                                                                                                                                   [ 16%]
test/launch_pytest/test_plugin.py .............                                                                                                                                                         [ 88%]
test/launch_pytest/tools/test_process.py ..                                                                                                                                                             [100%]

============================================================================================= 18 passed in 17.48s =============================================================================================

EDIT:
Also would it be possible to backport this to humble? Thanks

Signed-off-by: John-Henry Lim <42513874+Interpause@users.noreply.github.com>
@Interpause
Copy link
Author

Interpause commented Nov 2, 2024

Just saw #790. I think that one seems better as its more thorough & explicit, though that means more review work needed. Mine is closer to a quick workaround.

EDIT: I missed the case of putting Path inside a list of substitutions too it seems

@Interpause Interpause closed this Nov 2, 2024
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.

[Enhancement] normalize_to_list_of_substitutions should cast pathlib.Path to str
1 participant