PolarGeospatialCenter / imagery_utils

Other
34 stars 10 forks source link

Func and unit test enhancement #10

Closed stevefoga closed 6 years ago

stevefoga commented 6 years ago

Tests were added and enhanced to accomplish two things: A) Expand coverage to modules and individual functions not previously tested, and B) Test data generated with previous versions of the software against the newest version.

Regarding test expansion (part A), no pre-processing or process alteration has to happen; simply run the code.

Regarding output data testing (part B), there is no reporting or analysis of the results; the image comparison simply asserts if the old image's array is equivalent to the new image, and the shapefile tests assert various attributes to be True. To run these tests, the following must be performed: 1) Data created with older/incumbent software must exist in a new directory named 'output_static', which is a copy of the 'output' directory, and must be manually created. File cleanup in the tearDown() functions has been disabled to retain all test data in the 'output' directory. 2) The func tests must be run with the new software to create the data to be tested, and kept in the 'output' directory.

The data tests are now a part of: unit_test_mosaic.py, unit_test_ndvi.py, unit_test_ortho_functions.py, and unit_test_pansharpen.py.