cogent3 / c3dev

cogent3 developer tools
5 stars 9 forks source link

Update unit testing guidelines #43

Open fredjaya opened 1 year ago

fredjaya commented 1 year ago

Writing tests still under unittest for PyCogent, instead of pytest.

Will need either discussion with others to outline the testing guidelines, or refer to pytest best practices.

GavinHuttley commented 11 months ago

A few things to note. First, cogent3 is migrating to using only pytest based tests. That said, the migration is incomplete. So we have a mixture of unittest and pytest. All new tests should be pytest only. Migration of unittest tests is not a high priority, and thus conversion is now done opportunistically. For example, if I'm updating test code for a new API change, I'll refactor any affected unittest test methods to pytest.

In terms of the docs, new devs need to abide by the above. For instructions on how to develop using pytest, point them to specific examples within our own test suite. They can ask questions on Discussions, or the relevant Issue.