-
Notifications
You must be signed in to change notification settings - Fork 9
Add basic tests for mixin subverbs #54
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
base: master
Are you sure you want to change the base?
Add basic tests for mixin subverbs #54
Conversation
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #54 +/- ##
===========================================
+ Coverage 15.30% 45.90% +30.60%
===========================================
Files 11 11
Lines 562 562
Branches 94 94
===========================================
+ Hits 86 258 +172
+ Misses 474 282 -192
- Partials 2 22 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2bc9c68 to
13390bc
Compare
|
Thanks for making some progress on the tests. Invoking the entirety of colcon as part of the tests here isn't something we'll want to do. There are a variety of reasons, but to name a couple:
Other extensions test their verbs without using subprocess invocations, and we should do the same here. Examples: |
13390bc to
5a47774
Compare
Signed-off-by: Leander Stephen D'Souza <[email protected]>
5a47774 to
e70b8e3
Compare
Thank you for attaching the documentation of the testing pattern of other members of |
cottsay
left a comment
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.
Thanks, this is looking a lot better. Looking forward to getting it merged and seeing that coverage number go up.
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.
We should align the YAML style with the rest of the project. Mind taking a look at #56, which adds a check for this?
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.
The show module of colcon-mixin does not print the mixins in a standardised YAML or JSON format. Hence, I cannot change this to an expected YAML output.
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.
Whoa, bummer. That might be worth filing a new issue.
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.
I have created #58 to ensure that the show subverb would print YAML output.
If you don't mind, could you please take a look at it?
Upon merging the said PR, I will modify demo.txt to have an expected YAML output.
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.
Unless there's a reason to use JSON here, I think we should use YAML. For one, it has better line-change-cleanliness. The filename can remain the same or change, whatever you prefer.
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.
I have modified the mixins to use a YAML format instead.
However, yamllint cannot check for linting in these files, as these have to end in a .mixin extension for discovery.
Signed-off-by: Leander Stephen D'Souza <[email protected]>
This is no longer needed after 9f2dc67 was merged. Additionally, use a pytest temporary directory for staging the config files rather than a static location.
Basic Info
Description of contribution in a few bullet points
This PR adds base integration tests for colcon mixin subverbs, covering the following:
Included a couple of mixin files -
build-type.mixinandcoverage.mixinfrom the colcon-mixin-repository to serve as a basis for all repository testing.Description of how this change was tested
python3 -m pytest test.