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
Currently every assertion function calls to testing.T.Helper() unconditionally. testing.T.Helper() collects function name from stack trace, and it is quite expensive operation.
And go 1.12 collects traces even slower than go 1.11, therefore tests became to be slower.
There is no need to call testing.T.Helper() if assertion is satisfied, therefore I propose to move call to Helper to failing case instead of unconditional call.
The text was updated successfully, but these errors were encountered:
I just switched our tests from the standard func TestX(t *testing.T) to testify suites func (suite *MyTestSuite) TestX() and noticed the tests are taking considerably longer. If this is the source of that increased time it would be excellent to have this changed.
Currently every assertion function calls to
testing.T.Helper()
unconditionally.testing.T.Helper()
collects function name from stack trace, and it is quite expensive operation.And go 1.12 collects traces even slower than go 1.11, therefore tests became to be slower.
There is no need to call
testing.T.Helper()
if assertion is satisfied, therefore I propose to move call toHelper
to failing case instead of unconditional call.The text was updated successfully, but these errors were encountered: