CABLE-LSM / benchcab

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

Update the tests for stdout. #221

Closed bschroeter closed 9 months ago

bschroeter commented 9 months ago

The logging implementation #103, has revealed that many of the tests rely on standard out.

As per meeting 18/12/23 we should probably be testing the functionality (where possible) than the messages (print statements) that are emitted from the tested functions.

For example: https://github.com/CABLE-LSM/benchcab/blob/0d2e415137f6338412742b85d0ecd481aaf3fc6b/tests/test_model.py#L173

We can make use of temporary files/directories in GitHub actions, and can use a combination of subprocess mocking and dummy data to test functionality that would otherwise rely on an actual run of CABLE.