Skip to content

Commit a9a42a7

Browse files
committed
Add doctest
The doctest assures that there is no output when calling `getfixture("crate")`.
1 parent 08e807f commit a9a42a7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/layer.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
============
2+
Pytest Crate
3+
============
4+
5+
Pytest fixtures can also be used in doctests, however, doctests always capture
6+
the outout of any method calls.
7+
8+
Therefore the pytest fixture must not print anything to stdout/stderr but
9+
rather use a logger.
10+
11+
.. code-block::
12+
13+
>>> crate = getfixture("crate")

0 commit comments

Comments
 (0)