stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
23.55k stars 1.6k forks source link

the testing package may cause a crash #1676

Closed daocoder2 closed 2 weeks ago

daocoder2 commented 2 weeks ago

You can refer to the details of the problem here the testing package may cause a crash, I am not sure if you would consider changing the implementation. This should happen after go 1.18.

brackendawson commented 2 weeks ago

Doesn't recreate when using the testing.T passed to a test.

From the docs:

Assertions allow you to easily write test code, and are global funcs in the assert package. All assertion functions take, as the first argument, the *testing.T object provided by the testing framework. This allows the assertion funcs to write the failings and other details to the correct place.