-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version)?
1.18
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
N/A, but Mac or Linux both.
What did you do?
Wrote test cases with non-trivial infrastructure and used -coverprofile.
What did you expect to see?
Coverage information for my test code and test infrastructure.
What did you see instead?
Coverage information only for the package being tested.
The issue here is that in some cases, tests may reasonably want some non-trivial infrastructure or setup code, which isn't logically relevant to the package outside of its unit tests, but which is complex enough that I want to be carefully verifying that code too, not just the overall results of unit tests using it. Being able to confirm/deny that the test code is running as expected, and not skipping things early or happening to hit only happy paths in the test logic, would be useful for diagnosing this.
m3talsmith
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.