Tests
Testing is done using the unittest module. Use the below command to run all the tests:
make runtest
Testing strategies
Test the expected format of the output files.
Use of random input values and calculated output values to validate the test.
Sometimes special cases are run, and some input values which do not make a difference to the output are made random. Eg: In case of testing the sign of look-angles, only the sign of the angle at which the sensor is tilted (with respect to the nadir-pointing frame) is important, and the magnitude can be used as an random input.
In cases where the random input values do influence the output, the expected output is calculated (as much as possible) from methods, code other than used by the
InstruPypackage. Sometimes the chosen validation methods are approximate in which case an approximately equal to assertion tests are used.
Using known inputs, and outputs from external sources (eg: literature).
Use results from a previous run (corresponding to an older version of the software) as truth data.
Run tests after making any revisions to the code. This helps to check that the revisions do not have unintended effects on the results.