NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
14 stars 11 forks source link

fixed bugs introduced by finish log with emphasis pr #497

Closed evrose54 closed 5 months ago

evrose54 commented 5 months ago

Reviewer Checklist

Related Issues

stems from bugs introduced by NRLMMD-GEOIPS/geoips#464 see NRLMMD-GEOIPS/recenter_tc#33

Testing Instructions

Run pytest -v geoips/tests/unit_tests/commandline/test_log_setup.py and ./geoips/tests/integration_tests/full_test.sh

Summary

Finish log with emphasis PR (#464) introduced a couple of bugs that weren't caught by GeoIPS devs. This PR fixes those bugs and ensues that both the unit tests and accociated scripts pass without failure. This fix changes a bug in test_log_setup.py where generate_random_messages(add_long_word=True) would return a map object rather than an iterable list of strings. map objects have no length attribute and caused failures within geoips/commandline/log_setup:log_with_emphasis. We also added a new check in log_with_emphasis that raises a TypeError if one or more of the items in the unpacked list of *messages doesn't have a length attribute. Ie. None, map, etc.

modified: geoips/commandline/log_setup.py
modified: tests/unit_tests/commandline/test_log_setup.py