-
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
How to write benchmarks using testify / suite ? #811
Comments
You should be able to use the func BenchmarkFoo(b *testing.B) {
require.NoError(b, fmt.Errorf("test error"))
} Testify uses TestingT interface which is satisfied by both |
But there is no way to run benchmarks with testify/suite. |
Suite now has an extra |
Do you think we can change More essentially, change
|
We've had that change before and it breaks backwards compatibility. We'd be happy to consider it but it would be implemented in testify v2 |
Doesn #495 cover this use case? |
@boyan-soubachov Suites don't seem to expose much about their If that's the only place it's exposed, I think it would be possible to do it compatibly by having it return a I think direct use of |
Here is an workaround for anyone who has the same problem:
|
Why does mine shows a |
Ah nvm, it's an interface contract.. Okay thanks |
Any progress? |
I'm doing benchmarks w/ Suite and I suggest a small modification to @carlcarl suggestion:
This serves two purposes:
|
No description provided.
The text was updated successfully, but these errors were encountered: