-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: unexpected top level test output belonging to a subtest #29755
Comments
CC @mpvl @josharian As far as I can tell the indentation looks right. I suspect a |
I ran into this bug as well. I started reading test2json for the first time. From my not-yet-informed first read, it seems like the bug may be that Maybe Anyone familiar with this code that might be able to confirm? I can work on contributing a fix. |
Change https://golang.org/cl/196617 mentions this issue: |
In support of a workaround for golang/go#29755
See golang/go#29755. If a test fails, and there is no test output (other than framing), then print all the test output for the entire test case. This won't fix the issue if the test which failed had some output, but well behaved tests generally shouldn't non-failure message output, so hopefully this case is rare.
See golang/go#29755. If a test fails, and there is no test output (other than framing), then print all the test output for the entire test case. This won't fix the issue if the test which failed had some output, but well behaved tests generally shouldn't non-failure message output, so hopefully this case is rare.
In support of a workaround for golang/go#29755
See golang/go#29755. If a test fails, and there is no test output (other than framing), then print all the test output for the entire test case. This won't fix the issue if the test which failed had some output, but well behaved tests generally shouldn't non-failure message output, so hopefully this case is rare.
In support of a workaround for golang/go#29755
See golang/go#29755. If a test fails, and there is no test output (other than framing), then print all the test output for the entire test case. This won't fix the issue if the test which failed had some output, but well behaved tests generally shouldn't non-failure message output, so hopefully this case is rare.
See golang/go#29755. If a test fails, and there is no test output (other than framing), then print all the test output for the entire test case. This won't fix the issue if the test which failed had some output, but well behaved tests generally shouldn't non-failure message output, so hopefully this case is rare.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A, working with master.
What operating system and processor architecture are you using (
go env
)?What did you do?
Run code from this playground example
What did you expect to see?
Expected to see the test output
some_test.go:14: woah, something went wrong
belong to the top level test and not the inner subtest. E.g., when running the above with
-json
I'd expect this output:note the test name in the json output is expected to be
TestThis/topLevelTest
What did you see instead?
Instead the output and
-json
output makes it seem as if it belongs to the inner subtest, i.e., test nameTestThis/topLevelTest/subA
This may be a misuse of the API, but I couldn't find any docs that mention there shouldn't be anything in between subtests.
The -json output was:
This might be an issue with test2json.
The text was updated successfully, but these errors were encountered: