Skip to content

Commit

Permalink
Add tests for the CLI info command
Browse files Browse the repository at this point in the history
  • Loading branch information
adehecq committed Aug 6, 2024
1 parent cbbb130 commit ffb96a0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,17 @@ def test_download():

assert result.exit_code == 0
assert "LT05_L1TP_038037_20120505_20200820_02_T1.tar" in os.listdir(tmpdir)


def test_info():
"""Test the info command with each subcommand: dataset, filters"""
runner = CliRunner()

# Test the dataset subcommand
result = runner.invoke(cli, ["info", "dataset"])
assert result.exit_code == 0
assert len(result.output) == 7260 # Possibly to be updated in the future

# Test the filters subcommand
result = runner.invoke(cli, ["info", "filters", "declassii"])
assert result.exit_code == 0

0 comments on commit ffb96a0

Please sign in to comment.