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

SetupTest does not run on subtests #832

Closed
ahoulgrave opened this issue Oct 25, 2019 · 2 comments · Fixed by #1246
Closed

SetupTest does not run on subtests #832

ahoulgrave opened this issue Oct 25, 2019 · 2 comments · Fixed by #1246

Comments

@ahoulgrave
Copy link

Here you can see test failing
https://play.golang.org/p/R3m0s_PxwGG

If we call SetupTest() manually inside the subtest works correctly: https://play.golang.org/p/XpsmRqH2F4t

Is this intended behaviour?

@NefixEstrada
Copy link

NefixEstrada commented Mar 18, 2020

What's the state of this? I'd really use a hook like SetupSubTest or something like this. I use subtests not just for table testing but for documenting each scenario of the function that I'm testing, and thus I end up executing SetupTest on each subtest. Maybe we could implement it in a PR or something?

@gsagrawal
Copy link

duplicate of #1031

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 a pull request may close this issue.

3 participants