Updated fixtures.rst
Added fixtures decorators, otherwise it seems possible to use standard Python functions as fixtures.
This commit is contained in:
parent
121b69276a
commit
e2ff60f8e9
|
@ -129,10 +129,11 @@ example would work if we did it by hand:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
def first_entry():
|
def first_entry():
|
||||||
return "a"
|
return "a"
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
def order(first_entry):
|
def order(first_entry):
|
||||||
return [first_entry]
|
return [first_entry]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue