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

run: automatically turn on verbose mode if run with "go test -v" #126

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from

Conversation

jhenstridge
Copy link
Contributor

If I'm working on a project that doesn't use go-check, I can run go test to see only failures, or go test -v to see status messages as each test is run. If the project is using go-check though, I'd need to run go test -v -check.v for the latter.

This is a pain if I've got a set of packages with some using go-check and others not, and want to run tests on all of them. If I run go test -v ./..., I miss out on status messages for the go-check modules. If I run go test -v ./... -check.v, the packages that don't use go-check fail because they don't understand the flag.

I can't think of many cases where you'd want to enable stdlib verbose mode but not go-check verbose mode, so this PR automatically turns on go-check verbose mode by checking testing.Verbose(). Looking at the docs on pkg.go.dev, this was added in Go 1.1, so shouldn't introduce a compatibility problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant