Skip to content

Commit 78479fe

Browse files
doc: getting started: refer to strategy section for how transition() works
Better refer to a working strategy example. This way we can also drop this untestable code block. Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent 1eb0844 commit 78479fe

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

doc/configuration.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,8 @@ Implements:
26082608
Arguments:
26092609
- None
26102610

2611+
.. _conf-strategies:
2612+
26112613
Strategies
26122614
----------
26132615

doc/getting_started.rst

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,7 @@ strategies.
465465

466466
To use a strategy, add it and its dependencies to your configuration YAML,
467467
retrieve it in your test and call the ``transition(status)`` function.
468-
469-
.. code-block:: python
470-
471-
>>> from labgrid import Environment
472-
>>> env = Environment("env.yaml")
473-
>>> target = env.get_target("main")
474-
>>> strategy = target.get_driver("Strategy")
475-
>>> strategy.transition("barebox")
468+
See the section about the various :ref:`shipped strategies <conf-strategies>`
469+
for examples on this.
476470

477471
An example using the pytest plugin is provided under `examples/strategy`.

0 commit comments

Comments
 (0)