-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Milestone
Description
The testing.Short() have to report -test.short flag is set. But, it looks not working on TestMain(*testing.M).
You can see this behavior on this example.
https://gist.github.com/umisama/cebb1c8f9022e5402d21
Here is output on my environment.
$ go version
go version go1.4 linux/amd64
$ go test -short
false on TestMain
true on TestSomething
PASS
ok _/home/umisama/testingshort 0.008s
In the example I expected to testing.Short() returns true for TestXxx() including TestMain(*testing.M), but it returns false on TestMain(*testing.M).
I'll create patch if this behavior is unexpected.
Reactions are currently unavailable