aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
46 stars 31 forks source link

some new test utilities #686

Closed ocehugo closed 3 years ago

ocehugo commented 3 years ago

These are some utilities to reduce some manual testing, code size in test classes, and also to avoid write test classes in some cases.

test_docstring enable us to use the function docstring as tests. It reads the docstring blocks within the %Example: subblock and evaluate every expression. It's simple (no multiline evaluation), but help us to reduce code size and make sure docstrings are updated.

EDIT: moved some commits to another branch to be self contained.

ocehugo commented 3 years ago

@lbesnard - I just rebased to be more self-contained and given some related changes down the road (since no review was done here anyway).

lbesnard commented 3 years ago

some of these functions are already in the 687 PR

ocehugo commented 3 years ago

Yes, they were nested/dependent.