Skip to content

Commit 80c6583

Browse files
doc: overview: test examples via doctest
Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent a26b0d5 commit 80c6583

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

doc/overview.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Each driver and resource can have an optional name. This parameter is required
127127
for all manual creations of drivers and resources. To manually bind to a
128128
specific driver set a binding mapping before creating the driver:
129129

130+
.. doctest::
131+
130132
>>> from labgrid import Target
131133
>>> from labgrid.resource import SerialPort
132134
>>> from labgrid.driver import SerialDriver
@@ -166,7 +168,7 @@ Otherwise, `0` is returned as the default priority.
166168
To set the priority of a protocol for a driver, add a class variable with the
167169
name `priorities`, e.g.
168170

169-
.. code-block:: python
171+
.. testcode::
170172

171173
import attr
172174
from labgrid.driver import Driver

0 commit comments

Comments
 (0)