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

Declare test dependencies in [test] extra #86

Merged
merged 1 commit into from Oct 19, 2022

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Oct 17, 2022

Adding a test dependency on 'pytest' will cause colcon to use pytest when running the package's tests, which yields a better experience than the existing fallback to unittest.

Adding a test dependency on 'pytest' will cause colcon to use pytest
when running the package's tests, which yields a better experience than
the existing fallback to unittest.
@cottsay cottsay self-assigned this Oct 17, 2022
@@ -20,6 +20,13 @@
['resource/' + package_name]),
],
install_requires=install_requires,
extras_require={
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not against this, but in many of our other python packages we specify:

tests_require=['pytest'],

Any particular reason for the difference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, that option is largely deprecated, and maintainers are strongly encouraged to define test dependencies in another way. The method proposed here is fairly widely supported.

This ticket might have more info on the topic: colcon/colcon-core#444

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. That is going to be another round of deprecations we are probably going to have to fix for Ubuntu 24.04 (with whatever newer setuptools is in there).

But that's not your fault or the fault of this PR :). Approving.

@@ -20,6 +20,13 @@
['resource/' + package_name]),
],
install_requires=install_requires,
extras_require={
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. That is going to be another round of deprecations we are probably going to have to fix for Ubuntu 24.04 (with whatever newer setuptools is in there).

But that's not your fault or the fault of this PR :). Approving.

@cottsay cottsay merged commit 77cf537 into master Oct 19, 2022
@cottsay cottsay deleted the cottsay/extras_require_test branch October 19, 2022 02:09
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.

None yet

2 participants