-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: Add actionable instruction to checkpoint empty state #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,6 +91,14 @@ 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. Create one using 'checkpoint create <name>'." in output | ||
| ) | ||
|
Comment on lines
+97
to
+99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assertion duplicates the output string from Additionally, using assert output.strip() == EXPECTED_MESSAGE_CONSTANTReferences
|
||
|
|
||
|
|
||
| def test_cli_checkpoint_create_and_list(tmp_path, capsys, monkeypatch) -> None: | ||
| session_file = tmp_path / "session.json" | ||
| checkpoint_dir = tmp_path / "checkpoints" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command name
createis hardcoded in this message. This can lead to inconsistencies if the command is ever renamed, as the change would need to be made in multiple places (e.g., the argument parser definition). This also leads to duplication of the message string in the test suite. To improve maintainability, consider defining a constant for the command name and/or the full message. This would ensure the implementation, help text, and tests stay in sync.References