@@ -841,8 +841,8 @@ def __call__(self, function):
841
841
def fixture (scope = "function" , params = None , autouse = False , ids = None , name = None ):
842
842
""" (return a) decorator to mark a fixture factory function.
843
843
844
- This decorator can be used (with or or without parameters) to define
845
- a fixture function. The name of the fixture function can later be
844
+ This decorator can be used (with or without parameters) to define a
845
+ fixture function. The name of the fixture function can later be
846
846
referenced to cause its invocation ahead of running tests: test
847
847
modules or classes can use the pytest.mark.usefixtures(fixturename)
848
848
marker. Test functions can directly use fixture names as input
@@ -861,16 +861,16 @@ def fixture(scope="function", params=None, autouse=False, ids=None, name=None):
861
861
reference is needed to activate the fixture.
862
862
863
863
:arg ids: list of string ids each corresponding to the params
864
- so that they are part of the test id. If no ids are provided
865
- they will be generated automatically from the params.
864
+ so that they are part of the test id. If no ids are provided
865
+ they will be generated automatically from the params.
866
866
867
867
:arg name: the name of the fixture. This defaults to the name of the
868
- decorated function. If a fixture is used in the same module in
869
- which it is defined, the function name of the fixture will be
870
- shadowed by the function arg that requests the fixture; one way
871
- to resolve this is to name the decorated function
872
- ``fixture_<fixturename>`` and then use
873
- ``@pytest.fixture(name='<fixturename>')``.
868
+ decorated function. If a fixture is used in the same module in
869
+ which it is defined, the function name of the fixture will be
870
+ shadowed by the function arg that requests the fixture; one way
871
+ to resolve this is to name the decorated function
872
+ ``fixture_<fixturename>`` and then use
873
+ ``@pytest.fixture(name='<fixturename>')``.
874
874
875
875
Fixtures can optionally provide their values to test functions using a ``yield`` statement,
876
876
instead of ``return``. In this case, the code block after the ``yield`` statement is executed
0 commit comments