You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that the logging of errors for subtests doesn't show up for me as they did a few weeks ago.
The commit that is causing the problem for me is e4d8020.
I am using the standard config (without the coverage generation).
Please let me know if you need more information or if its something I overlooked.
=== RUN TestErrorLogs
=== RUN TestErrorLogs/0
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
=== RUN TestErrorLogs/1
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
=== RUN TestErrorLogs/2
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
--- FAIL: TestErrorLogs (0.00s)
--- FAIL: TestErrorLogs/0 (0.00s)
--- FAIL: TestErrorLogs/1 (0.00s)
--- FAIL: TestErrorLogs/2 (0.00s)
FAIL
FAIL github.com/hendrikbursian/w 0.007s
Steps To Reproduce
Use config from my bug report
Use the failing commit hash
Run a failing subtest with t.Run() (see bug report)
See missing error logs
=== RUN TestErrorLogs
--- FAIL: TestErrorLogs (0.00s)
Expected Behavior
When I run a failing subtest I want to be able to see the log of the failed subtest.
For example:
=== RUN TestErrorLogs
=== RUN TestErrorLogs/0
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
=== RUN TestErrorLogs/1
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
=== RUN TestErrorLogs/2
parser_test.go:118: log test
parser_test.go:119: error test
parser_test.go:120: fatal test
--- FAIL: TestErrorLogs (0.00s)
--- FAIL: TestErrorLogs/0 (0.00s)
--- FAIL: TestErrorLogs/1 (0.00s)
--- FAIL: TestErrorLogs/2 (0.00s)
FAIL
FAIL github.com/hendrikbursian/w 0.007s
Hey @hendrikbursian and thanks for the super detailed bug report! ⭐
Ah, I think I see the problem here. Right now, each test's output is being filtered so only the exactly one matching test will show its output for each test run. But it does make sense to show all subtest output too, of a given test. Especially when you think how some of sub-tests will be difficult to detect, like this integer iteration one. Just like you experienced, the output of the subtests are not seen anywhere!
I am on vacation currently, and I just whipped up a really quick and dirty fix for this, which I'm not sure is going to be stable enough on its own... but perhaps. I just want to make sure you won't start seeing other unrelated test output for a given test, before merging it in.
Please give it a go if you wish by using neotest-golang with branch = "fix-for-range-test" in your lazy.nvim config.
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0
Operating system/version
Ubuntu 22.04
Describe the bug
Hi, thanks for the plugin!
I just noticed that the logging of errors for subtests doesn't show up for me as they did a few weeks ago.
The commit that is causing the problem for me is e4d8020.
I am using the standard config (without the coverage generation).
Please let me know if you need more information or if its something I overlooked.
Kind regards
Hendrik
Testfile
Output on commit e4d8020
Output on commit c9e6fe5 (previous commit)
Steps To Reproduce
t.Run()
(see bug report)Expected Behavior
When I run a failing subtest I want to be able to see the log of the failed subtest.
For example:
Your Lua setup
The text was updated successfully, but these errors were encountered: