From b44e991b4aded6871b9192cf30192ab421f1fe04 Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Fri, 23 Feb 2024 12:54:02 -0500 Subject: [PATCH] Update CLI and test response if cache save fails --- circfirm/cli.py | 1 + tests/test_cli.py | 1 + 2 files changed, 2 insertions(+) diff --git a/circfirm/cli.py b/circfirm/cli.py index 9e0b285..b2f4ba1 100644 --- a/circfirm/cli.py +++ b/circfirm/cli.py @@ -167,4 +167,5 @@ def cache_save(board: str, version: str, language: str) -> None: args=(board, version, language), ) except ConnectionError as err: + click.echo(" failed") # Mark as failed raise click.exceptions.ClickException(err.args[0]) diff --git a/tests/test_cli.py b/tests/test_cli.py index ccd0b58..4fb6c0a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -139,6 +139,7 @@ def test_cache_save() -> None: ) assert result.exit_code == 1 assert result.output == ( + "Caching firmware version 7.3.0 for feather_m4_express... failed\n" "Error: Could not download spectified UF2 file:\n" "https://downloads.circuitpython.org/bin/feather_m4_express/" "nolanguage/"