Skip to content

Commit

Permalink
add second cli test to test with dir
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Jul 2, 2024
1 parent fc8c29b commit 0a3586a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/unit/test_run_stitchee.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestBatching:
__harmony_path = __data_path.joinpath("harmony")
__granules_path = __harmony_path.joinpath("granules")

def test_run_stitchee_cli_with_no_error(self, temp_output_dir):
def test_run_stitchee_cli_with_three_filepaths(self, temp_output_dir):
test_args = [
concatenator.run_stitchee.__file__,
path_str(
Expand All @@ -55,3 +55,20 @@ def test_run_stitchee_cli_with_no_error(self, temp_output_dir):

with patch.object(sys, "argv", test_args):
concatenator.run_stitchee.main()

def test_run_stitchee_cli_with_one_directorypath(self, temp_output_dir):
test_args = [
concatenator.run_stitchee.__file__,
str(self.__granules_path),
"--copy_input_files",
"--verbose",
"-o",
path_str(temp_output_dir, "test_run_stitchee_output.nc"),
"--concat_method",
"xarray-concat",
"--concat_dim",
"mirror_step",
]

with patch.object(sys, "argv", test_args):
concatenator.run_stitchee.main()

0 comments on commit 0a3586a

Please sign in to comment.