NRLMMD-GEOIPS / geoips

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

Consider replacing how we capture output in some of our CLI unit tests with ``pytest.capsys`` #628

Open evrose54 opened 3 weeks ago

evrose54 commented 3 weeks ago

Requested Update

Description

In #465 we replaced a large portion of the CLI unit tests to use monkeypatch. This speeds up the unit tests by an extreme amount, but we had to alter how we captured output for these tests as we were no longer piping the output of a subprocess call. We used redirect_stdout/stderr to an IO Stream to capture the output of the commands, but this can likely be replaced by using pytest.capsys. This is a low priority issue as what we have currently works fine, but will definitely clean up some of the unit tests if we get this implemented.

Background and Motivation

This stems from two comments (1, 2) on #465.

Code to demonstrate issue

tests/unit_tests/commandline/cli_top_level_tester:capture_output & viable_monkeypatch.

Checklist for Completion