Skip to content

Commit

Permalink
additional cookbook wording
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Aug 18, 2023
1 parent a769dbc commit 8cb04ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ with the :class:`~screenpy.actions.Either` Action!::

the_actor.will(Either(DoAction()).or_(DoDifferentAction())

Screenpy will attempt to perform the first action (or set of actions) but
if an `AssertionError` is raised screenpy will move on to attempt performing the
second action (or set of actions) instead. Note that we only catch
`AssertionError` here allowing for other exceptions to still be raised.
The Actor will attempt to perform the first action (or set of actions).
If successful, the Actor moves on. but an `AssertionError` is raised the Actor will
begin performing the second action (or set of actions) passed into :meth:`~screenpy.actions.Either.or_`.
Note the Actor only catches `AssertionError` here allowing for other exceptions to still be raised.

The action also allows users to pass in multiple actions similar to how actors can perform
multiple actions in one call::
:class:`~screenpy.actions.Either` allows users to pass in multiple actions. This is
similar Actor performing multiple actions in one call::

the_actor.will(
Either(
Expand Down

0 comments on commit 8cb04ab

Please sign in to comment.