-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FunctionalOptions dont work if function call not in the test-function scope #1449
Comments
The bug is in assertOpts The issue is that assertOpts is gathering a list of expected function names and actual function names using The test output hints at this but is cryptic in where these values are coming from.
That's because it actually strips away the function name. Here is what happens when you do a printLn in
now it makes a lot more sense why its failing. |
I have similar issue but funny enough when running the test in debug (no breakpoint) the test works but when ran normally (not in debug) the value changes and test fails. Any idea why? Would it be related to this thread? |
Closing duplicate of #1380 |
example from mock_test.go
this works:
this doesnt work:
The text was updated successfully, but these errors were encountered: