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 think this is reasonable limitation, f is assigned before the
testing package can replace it. If the example author does
this, then it's probably intentional to bypass the output
capture.
It doesn't work, so, don't do that. Examples are a convenience feature for documentation, not something that has to work no matter what the program does.
Examples do not capture stdout when os.Stdout is assigned to a variable outside the example body:
The text was updated successfully, but these errors were encountered: