Skip to content

Commit 47a2a77

Browse files
authored
Merge pull request #2354 from shobute/patch-1
Corrected documentation typo in fixtures.py
2 parents 8c69d5c + 21f1c2b commit 47a2a77

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

_pytest/fixtures.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ def __call__(self, function):
841841
def fixture(scope="function", params=None, autouse=False, ids=None, name=None):
842842
""" (return a) decorator to mark a fixture factory function.
843843
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
846846
referenced to cause its invocation ahead of running tests: test
847847
modules or classes can use the pytest.mark.usefixtures(fixturename)
848848
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):
861861
reference is needed to activate the fixture.
862862
863863
: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.
866866
867867
: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>')``.
874874
875875
Fixtures can optionally provide their values to test functions using a ``yield`` statement,
876876
instead of ``return``. In this case, the code block after the ``yield`` statement is executed

0 commit comments

Comments
 (0)