Skip to content

Commit bee59c3

Browse files
committed
Fix regendoc
The finalizers example was wiping out code needed for the examples below.
1 parent adaa463 commit bee59c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/en/how-to/fixtures.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,10 +744,10 @@ Note on finalizer order
744744
Finalizers are executed in a first-in-last-out order.
745745
For yield fixtures, the first teardown code to run is from the right-most fixture, i.e. the last test parameter.
746746

747-
.. regendoc:wipe
748747

749748
.. code-block:: python
750749
750+
# content of test_finalizers.py
751751
import pytest
752752
753753
@@ -769,7 +769,7 @@ For yield fixtures, the first teardown code to run is from the right-most fixtur
769769
770770
.. code-block:: pytest
771771
772-
$ pytest test_module.py
772+
$ pytest test_finalizers.py
773773
=========================== test session starts ============================
774774
platform linux -- Python 3.x.y, pytest-7.x.y, pluggy-1.x.y
775775
collected 1 item
@@ -784,6 +784,7 @@ For finalizers, the first fixture to run is last call to `request.addfinalizer`.
784784

785785
.. code-block:: python
786786
787+
# content of test_finalizers.py
787788
import pytest
788789
789790
@@ -799,7 +800,7 @@ For finalizers, the first fixture to run is last call to `request.addfinalizer`.
799800
800801
.. code-block:: pytest
801802
802-
$ pytest test_module.py
803+
$ pytest test_finalizers.py
803804
=========================== test session starts ============================
804805
platform linux -- Python 3.x.y, pytest-7.x.y, pluggy-1.x.y
805806
collected 1 item

0 commit comments

Comments
 (0)