We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 version
gopls -v version
Build info ---------- golang.org/x/tools/gopls v0.11.0 golang.org/x/tools/[email protected] h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY= github.com/BurntSushi/[email protected] h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/google/[email protected] h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= golang.org/x/[email protected] h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE= golang.org/x/exp/[email protected] h1:fl8k2zg28yA23264d82M4dp+YlJ3ngDcpuB1bewkQi4= golang.org/x/[email protected] h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/[email protected] h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/[email protected] h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/[email protected] h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/[email protected] h1:7/HkGkN/2ktghBCSRRgp31wAww4syfsW52tj7yirjWk= golang.org/x/[email protected] h1:qptQiQwEpETwDiz85LKtChqif9xhVkAm8Nhxs0xnTww= honnef.co/go/[email protected] h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA= mvdan.cc/[email protected] h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM= mvdan.cc/xurls/[email protected] h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc= go: go1.20.2
code -v
code-insiders -v
1.77.0 7f329fe6c66b0f86ae1574c2911b681ad5a45d63 x64
Go: Locate Configured Go Tools
Checking configured tools.... GOBIN: undefined toolsGopath: gopath: /home/emil.hemdal/go GOROOT: /home/linuxbrew/.linuxbrew/Cellar/go/1.20.2/libexec PATH: /home/emil.hemdal/.local/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/emil.hemdal/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin go: /home/linuxbrew/.linuxbrew/bin/go: go version go1.20.2 linux/amd64 gotests: /home/emil.hemdal/go/bin/gotests (version: v1.6.0 built with go: go1.20.1) gomodifytags: /home/emil.hemdal/go/bin/gomodifytags (version: v1.16.0 built with go: go1.20.1) impl: /home/emil.hemdal/go/bin/impl (version: v1.1.0 built with go: go1.20.1) goplay: /home/emil.hemdal/go/bin/goplay (version: v1.0.0 built with go: go1.20.1) dlv: /home/emil.hemdal/go/bin/dlv (version: v1.20.1 built with go: go1.20.1) staticcheck: /home/emil.hemdal/go/bin/staticcheck (version: v0.4.2 built with go: go1.20.1) gopls: /home/emil.hemdal/go/bin/gopls (version: v0.11.0 built with go: go1.20.2) go env Workspace Folder (snip): /home/emil.hemdal/dev/snip GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/emil.hemdal/.cache/go-build" GOENV="/home/emil.hemdal/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/emil.hemdal/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/emil.hemdal/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/linuxbrew/.linuxbrew/Cellar/go/1.20.2/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/linuxbrew/.linuxbrew/Cellar/go/1.20.2/libexec/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.20.2" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc-11" CXX="g++-11" CGO_ENABLED="1" GOMOD="/home/emil.hemdal/dev/snip/go.mod" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3467527775=/tmp/go-build -gno-record-gcc-switches"
"go.formatTool": "gofmt",
Clicking run test on a sub level test in VS Code results in testing: warning: no tests to run.
run test
testing: warning: no tests to run
What I expect to happen is that the test should run.
Running the tests using the terminal works (i.e. go test -run=TestingTheTester/2/3 example.com/testingthetester/test)
go test -run=TestingTheTester/2/3 example.com/testingthetester/test
testingthe_test.go
package testingthetester_test import ( "testing" ) func TestTestingTheTester(t *testing.T) { t.Log("Level 1") t.Run("2", func(t *testing.T) { t.Log("Level 2") t.Run("3", func(t *testing.T) { t.Log("Level 3") t.Fatalf("Failing level 3") }) t.Fatalf("Failing level 2") }) t.Fatalf("Failing level 1") }
The text was updated successfully, but these errors were encountered:
Thanks for the report, especially the screencast.
From that output it looks clearly like the subtest pattern is not considering the intermediate subtest name.
CC @hyangah as I didn't find any existing bugs for this.
Sorry, something went wrong.
I think we should fix this with golang/go#59445, integrating test discovery with gopls.
Will leave this open to record the bug, so that we can verify it is fixed.
Thanks for the detailed report again. Let's track the progress in #3022.
Duplicate of #3022
No branches or pull requests
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Describe the bug
Clicking
run test
on a sub level test in VS Code results intesting: warning: no tests to run
.What I expect to happen is that the test should run.
Running the tests using the terminal works (i.e.
go test -run=TestingTheTester/2/3 example.com/testingthetester/test
)Steps to reproduce the behavior:
testingthe_test.go
)run test
"middle thingy"Screenshots or recordings
Screencast.from.2023-04-03.11.48.22.webm
The text was updated successfully, but these errors were encountered: