API Reference¶
Sphinx autodocumenter for pytest fixtures.
Classes:
|
|
|
Sphinx autodoc |
Functions:
|
Returns whether the given function is a fixture, and the fixture's scope if it is. |
|
Setup |
- class FixtureDecoratorFinder[source]¶
Bases:
NodeVisitorast.NodeVisitorfor finding pytest fixtures.Attributes:
Is the function a fixture?
If it is, the scope of the fixture.
- is_fixture¶
Is the function a fixture?
- scope¶
If it is, the scope of the fixture.
- class FixtureDocumenter(directive, name, indent='')[source]¶
Bases:
FunctionDocumenterSphinx autodoc
Documenterfor documenting pytest fixtures.Methods:
add_directive_header([sig])Add the directive's header.
can_document_member(member, membername, ...)Called to see if a member can be documented by this documenter.
- add_directive_header(sig='')[source]¶
Add the directive’s header.
- Parameters
sig (
str) – Unused – fixtures have no useful signature.
- is_fixture(function)[source]¶
Returns whether the given function is a fixture, and the fixture’s scope if it is.
- Parameters
function (
Union[FunctionType,MethodType])- Return type