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

Add markers to linter tests, move linter imports #576

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Aug 29, 2023

Test markers can be used to easily (de-)select tests, and colcon exposes mechanisms to do so. Linters are a category of tests that are commonly called out.

Additionally, if we move the imports for some of our single-purpose tests into the test function, we can avoid installing the linter dependencies entirely. This is a common case in platform packaging, where linter errors are not actionable and the dependencies are not typically installed.

When this change is merged here, I'll make the same change in the extension template package and eventually other colcon packages.

@cottsay cottsay added the enhancement New feature or request label Aug 29, 2023
@cottsay cottsay self-assigned this Aug 29, 2023
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c8995e3) 81.93% compared to head (bacf3cd) 81.93%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #576   +/-   ##
=======================================
  Coverage   81.93%   81.93%           
=======================================
  Files          65       65           
  Lines        3753     3753           
  Branches      724      724           
=======================================
  Hits         3075     3075           
  Misses        622      622           
  Partials       56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Test markers can be used to easily (de-)select tests, and colcon exposes
mechanisms to do so. Linters are a category of tests that are commonly
called out.

Additionally, if we move the imports for some of our single-purpose
tests into the test function, we can avoid installing the linter
dependencies entirely. This is a common case in platform packaging, where
linter errors are not actionable and the dependencies are not typically
installed.
Copy link
Contributor

@claraberendsen claraberendsen left a comment

Choose a reason for hiding this comment

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

LGTM

@cottsay cottsay merged commit e6cf296 into master Sep 2, 2023
33 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cottsay/test-labels branch September 2, 2023 23:26
@cottsay cottsay added this to the 0.13.0 milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants