Open evrose54 opened 4 months ago
As a note: It is perfectly fine to create fake data for testing particular functions. For example, you might want to create test data for testing the functions that generate latitude, longitude, satellite zenith angle, etc. by extracting a little data from a file. You could take a small bit of data from a file, hard-code it into the tests, then run the function and test the expected result.
Requested Update
Description
It was discussed in #670 that we should remove or refactor any unit test which makes use of data files. This could be test data, or any other data that is unlikely to be available to the CI. This change should occur for two reasons.
If you find yourself unable to test some code without a data file, it is likely that the code needs to be refactored into smaller portions that can be tested without data.
Background and Motivation
This issue stems from this comment on #670.
Code to demonstrate issue
geoips/tests/unit_tests/commandline/test_geoips_run.py
currently requires data. While the unit tests pass because we only check the very start of a process workflow, these unit tests should likely be removed altogether. In retrospect, all integration tests which run a procflow make use ofgeoips run
and the unit test becomes repetitive.Checklist for Completion