CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 4 forks source link

Tidy up organisation of unit tests #163

Closed SeanBryan51 closed 1 year ago

SeanBryan51 commented 1 year ago

Unit tests have an excessive amount of repeated test setup code, making unit tests harder to maintain and read. Better use of pytest fixtures to setup each test would remove needless code repetition.

Tests are also organised where each function func has a test function test_func. To get better use out of pytest fixtures, we should organise the tests so that for each function func, we have a test class TestFunc with each method of TestFunc containing a single test (success or failure case). This also prevents the possibility of state leaking into each test case.

SeanBryan51 commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @bschroeter @ccarouge