-
Notifications
You must be signed in to change notification settings - Fork 33
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
Wrong using defer in example #77
Labels
documentation
Improvements or additions to documentation
Comments
KolesnikDmitriy
added
the
documentation
Improvements or additions to documentation
label
Sep 26, 2023
what is a main idea of this MR? |
The main idea is fix documentation to avoid confusion of newcomers. They may start using defer after t.Require |
In common case it make sense but in that example the reason why defer stay there is to highlight semantic of WithTearDown function It looks like common sense to me that you need to put it in the begging of Test Let me think day or two about that |
fixed in #78 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Incorrect example with defer. Require my stops test execution when a test result fails, and defer stack will not fill.
To Reproduce
Steps to reproduce the behavior:
look through example:
https:/ozontech/allure-go/blob/master/examples/suite_demo/setup_test.go#L92
Expected behavior
defer should executed right after context declaration
The text was updated successfully, but these errors were encountered: