starry icon indicating copy to clipboard operation
starry copied to clipboard

Converting `assert` statements to unit tests?

Open Yash-10 opened this issue 4 years ago • 0 comments

Hello, thank you for this project and for making it open-source!

I realize some benefits of assert statements in source code. However, looking at some SO answers, for example here, I wonder if it would be a good idea to remove assert statements and instead convert them into their own unit tests inside the tests directory.

Some of the assert statements do not seem to have an explicit error message. So maybe, either assert statements could be coupled with an explicit message or they could be removed, and instead, unit tests could be added.

It would be interesting to know any thoughts/suggestions on this.

Thanks!

Yash-10 avatar Sep 24 '21 18:09 Yash-10