-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
types: start grouping tests in test suites #7395
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7395 +/- ##
=======================================
Coverage 55.35% 55.35%
=======================================
Files 587 587
Lines 36469 36469
=======================================
Hits 20189 20189
Misses 14192 14192
Partials 2088 2088 |
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.
utACK
@@ -1,4 +1,4 @@ | |||
package types | |||
package types_test |
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.
What is the reason of this change?
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.
When you use separate test packages you put yourself in the developers' shoes and get (almost) the guarantee that a client using the feature which broke in tests will also break when it's called (long story short: the whole point of using _test
packages, which incidentally are very Go-idiomatic).
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 think it's a matter of a taste. With _test
you are more focused on integration tests, and do potentially imports which could do cycle dependency. Without _test
you can access private functions and unit tests them.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes