rodluger / starry

Tools for mapping stars and planets.
https://starry.readthedocs.io
MIT License
138 stars 32 forks source link

Converting `assert` statements to unit tests? #294

Open Yash-10 opened 2 years ago

Yash-10 commented 2 years ago

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!