diff --git a/src/python_learning_orchestrated/cli.py b/src/python_learning_orchestrated/cli.py index 31751d2..51755d5 100644 --- a/src/python_learning_orchestrated/cli.py +++ b/src/python_learning_orchestrated/cli.py @@ -223,7 +223,10 @@ def main( if args.checkpoint_command == "list": checkpoints = checkpoint_store.list_checkpoints() if not checkpoints: - output_fn("No checkpoints found.") + output_fn( + "No checkpoints found. Use 'checkpoint create ' to save " + "your progress." + ) return output_fn(f"Checkpoints ({len(checkpoints)}):") for checkpoint in checkpoints: diff --git a/tests/test_cli_smoke.py b/tests/test_cli_smoke.py index e54e34c..430498c 100644 --- a/tests/test_cli_smoke.py +++ b/tests/test_cli_smoke.py @@ -91,6 +91,15 @@ def test_cli_export_and_import_progress_commands(tmp_path, capsys) -> None: assert len(session_payload["attempts"]) == 1 +def test_cli_checkpoint_list_empty(capsys) -> None: + main(["checkpoint", "list"]) + output = capsys.readouterr().out + assert ( + "No checkpoints found. Use 'checkpoint create ' to save your progress." + in output + ) + + def test_cli_checkpoint_create_and_list(tmp_path, capsys, monkeypatch) -> None: session_file = tmp_path / "session.json" checkpoint_dir = tmp_path / "checkpoints"