Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
exchanges/margin: Fix marshalling issue #1812
base: master
Are you sure you want to change the base?
exchanges/margin: Fix marshalling issue #1812
Changes from 1 commit
6f653a3
0f2b490
0bee885
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opinionated Nit:
As someone who runs tests verbose often, I really don't like having
t.Run
for trivial cases like this, over just adding tc.want to the end of the 2 checks, because of the increased output if we're always doing this.I feel like we want
t.Run
for tests which are going to take a lot of time, or where we might want to-run
them individually.The reason I raise this (again) is because if we keep adding it for ubiqutous methods like TestMarshal or TestString then we'll get a lot of this:
And it'll overwhelm scrollback and make grepping the test output harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be changing test design to suit dislike of the kind of verbose output when verbose and because of increased scrolling. The issue is much closer to "golang outputs subtests in an ugly manner" than "this test design has negative impacts". I understand your desire and you can and do design your tests without it. I do utilise the sub test functionality, its especially handy when one fails, to debug into just one of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll yield. I'll just stop using verbose as much as I do currently.
BTW, you noted already I assumed that there's obviously a performance hit for using t.Run, which you're accepting as "worth it".
It's only 0.05-0.1s for me, though, and pales in comparison to our tests in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know what you want me to do with this comment sorry. Do you want me to remove the whole test because its resolved in the
margin
package?