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

Remove tests on standard output #222

Closed SeanBryan51 closed 9 months ago

SeanBryan51 commented 9 months ago

This change removes any assertions on standard output from the tests so that tests focus on testing functionality (where possible) rather than the messages (print statements) that are emitted from the tested functions.

Fixes #221

codecov[bot] commented 9 months ago

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9a8ec67) 82.68% compared to head (04f651f) 82.42%. Report is 3 commits behind head on main.

Files Patch % Lines
benchcab/benchcab.py 0.00% 3 Missing :warning:
benchcab/fluxsite.py 90.00% 1 Missing :warning:
benchcab/model.py 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #222 +/- ## ========================================== - Coverage 82.68% 82.42% -0.26% ========================================== Files 28 28 Lines 1496 1417 -79 ========================================== - Hits 1237 1168 -69 + Misses 259 249 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SeanBryan51 commented 9 months ago

I'm happy to switch to subprocess-mock in our unit testing however this might be better to do in a separate PR. Is this what you are suggesting?

bschroeter commented 9 months ago

I'm happy to switch to subprocess-mock in our unit testing however this might be better to do in a separate PR. Is this what you are suggesting?

That makes sense. Let's just accept that coverage will go down, but we should raise another issue to re-engineer these tests to ensure that we're covered for the functionality going forward.

SeanBryan51 commented 9 months ago

Also just to clarify, is subprocess-mock referring to the pytest-subprocess pytest plugin that you have been working with?