Skip to content

metafunc.config is not included in API reference #3746

@keysmashes

Description

@keysmashes

metafunc.config is not included in the API reference for metafunc - presumably, the documentation comment needs to be directly above the line that sets self.config, but it isn't:

class Metafunc(fixtures.FuncargnamesCompatAttr):
    """
    Metafunc objects are passed to the :func:`pytest_generate_tests <_pytest.hookspec.pytest_generate_tests>` hook.
    They help to inspect a test function and to generate tests according to
    test configuration or values specified in the class or module where a
    test function is defined.
    """

    def __init__(self, definition, fixtureinfo, config, cls=None, module=None):
        #: access to the :class:`_pytest.config.Config` object for the test session
        assert (
            isinstance(definition, FunctionDefinition)
            or type(definition).__name__ == "DefinitionMock"
        )
        self.definition = definition
        self.config = config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions