-
Notifications
You must be signed in to change notification settings - Fork 22
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
go test is reporting [no tests to run] despite having many tests #15
Comments
This appears to be by design. Going to think about it some more, but I think we'll be reverting a recent commit that checks for this line explicitly and then marks the entire package as "no tests to run". This will have breaking changes on the output mechanism, but it's the right thing to do. We cannot be suppressing an entire package as a result of this behaviour. if err == nil {
norun := ""
if !testShowPass && !testJSON {
buf.Reset()
}
if bytes.HasPrefix(out, noTestsToRun[1:]) || bytes.Contains(out, noTestsToRun) {
norun = " [no tests to run]"
}
fmt.Fprintf(cmd.Stdout, "ok \t%s\t%s%s%s\n", a.Package.ImportPath, t, coveragePercentage(out), norun)
c.saveOutput(a)
} else {
base.SetExitStatus(1)
// If there was test output, assume we don't need to print the exit status.
// Buf there's no test output, do print the exit status.
if len(out) == 0 {
fmt.Fprintf(cmd.Stdout, "%s\n", err)
}
fmt.Fprintf(cmd.Stdout, "FAIL\t%s\t%s\n", a.Package.ImportPath, t)
} |
I'm not bothered enough by the So, if we come across a By default, this information won't be displayed. To get at that information use |
This may be an issue with go test itself (nothing to do with testify, as originally described).
This will require digging into how
go test
is flags a package as[no tests to run]
.https://github.com/golang/go/blob/8fc99d20f3377c7c5c1dba51b1be865ff61483b0/src/cmd/go/internal/test/test.go#L1197-L1204
The text was updated successfully, but these errors were encountered: