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
2 changes: 1 addition & 1 deletion src/specify_cli/workflows/steps/gate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GateStep(StepBase):
later with ``specify workflow resume``.

The user's choice is stored in ``output.choice``. ``on_reject``
controls abort / skip behaviour.
controls abort / skip / retry behaviour.
"""

type_key = "gate"
Expand Down
9 changes: 9 additions & 0 deletions tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,15 @@ def test_validate_accepts_valid(self):
class TestGateStep:
"""Test the gate step type."""

def test_docstring_lists_every_on_reject_behaviour(self):
# The docstring must not contradict validate()/execute(): on_reject
# accepts 'abort', 'skip', AND 'retry' (execute() has a dedicated
# retry -> PAUSED branch), but the summary omitted 'retry'.
from specify_cli.workflows.steps.gate import GateStep

for behaviour in ("abort", "skip", "retry"):
assert behaviour in GateStep.__doc__

@pytest.fixture(autouse=True)
def _non_tty_stdin_by_default(self, monkeypatch):
# Default every gate test to a non-TTY stdin so none can drop into
Expand Down