Skip to content
Closed
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: 10 additions & 2 deletions tests/test_cli_argument_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,16 +559,24 @@ def test_todo_claim_validation_preserves_exact_diagnostics(
assert str(exc_info.value) == expected


@pytest.mark.parametrize("command", ["add", "list", "update", "complete", "supersede"])
@pytest.mark.parametrize("command", ["add", "list", "supersede"])
@pytest.mark.parametrize("operation_id", ["retry-one", ""])
def test_claim_operation_id_is_not_silently_ignored_by_other_commands(command, operation_id):
args = build_parser().parse_args([
"todo", command, "--goal-id", "example-goal", "--claim-operation-id", operation_id,
])
with pytest.raises(ValueError, match="supported only by todo claim"):
with pytest.raises(ValueError, match="supported only by todo claim/update/complete"):
validate_shared_todo_options(args)


@pytest.mark.parametrize("command", ["claim", "update", "complete"])
def test_claim_operation_id_is_shared_by_lease_bound_commands(command):
args = build_parser().parse_args([
"todo", command, "--goal-id", "example-goal", "--claim-operation-id", "retry-one",
])
validate_shared_todo_options(args)


@pytest.mark.parametrize(
("extra_args", "expected"),
[
Expand Down
Loading