Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions isic_cli/cli/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,11 @@ def signal_handler(signum, frame):

with Progress(console=Console(file=sys.stderr)) as progress:
if limit == 0:
task = progress.add_task(
f"Downloading images ({nice_num_images} files, {nice_total_size})",
total=download_num_images,
)
message = f"Downloading images + metadata ({nice_num_images} files, {nice_total_size})"
else:
task = progress.add_task(
f"Downloading images (and metadata) ({nice_num_images} total)",
total=download_num_images,
)
message = f"Downloading images + metadata ({nice_num_images} files)"

task = progress.add_task(message, total=download_num_images)

images_iterator = itertools.islice(
get_images(ctx.session, search, collections), download_num_images
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_image_download_no_size_info_with_limit(cli_run, outdir):
result = cli_run(["image", "download", outdir, "--limit", "1"])
assert result.exit_code == 0
assert "2.0 MB" not in result.output
assert "1 total" in result.output
assert "1 files" in result.output


@pytest.mark.usefixtures("_isolated_filesystem", "_mock_images")
Expand Down