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

osmomath: disable thelper for some testing functions #5163

Closed
pysel opened this issue May 12, 2023 · 3 comments · Fixed by #5164
Closed

osmomath: disable thelper for some testing functions #5163

pysel opened this issue May 12, 2023 · 3 comments · Fixed by #5164
Assignees
Labels

Comments

@pysel
Copy link
Member

pysel commented May 12, 2023

Background

A few functions in osmomath/decimal.go are test helper functions, but they are not marked as helper functions

Suggested Design

mark these functions as helpers

Acceptance Criteria

helper functions marked

@ValarDragon
Copy link
Member

Why do we want this? Seems like it just avoids the fn being printed in the stacktrace, not sure why thats a feature for us? https://pkg.go.dev/testing#T.Helper

I'd prefer to not have to think about this personally.

@pysel
Copy link
Member Author

pysel commented May 12, 2023

hmm, on the second look, I now see that adding t.Helper there does not do anything useful, because those functions internally do not fail the test (aka: call t.FailNow, t.Fatal etc), so adding a t.Helper mark is a no-op. I just wanted to remove the linting warnings, but now that I revisited this, I decided to simply disable them for those specific functions

thank you!

@pysel pysel changed the title osmomath: mark test functions as helpers osmomath: disable thelper for some testing functions May 12, 2023
@ValarDragon
Copy link
Member

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants