diff --git a/changelog/3746.doc.rst b/changelog/3746.doc.rst new file mode 100644 index 000000000..4adecbec0 --- /dev/null +++ b/changelog/3746.doc.rst @@ -0,0 +1 @@ +Add documentation for ``metafunc.config`` that had been mistakenly hidden. diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 2657bff63..1561bddde 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -883,12 +883,13 @@ class Metafunc(fixtures.FuncargnamesCompatAttr): """ 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 + + #: access to the :class:`_pytest.config.Config` object for the test session self.config = config #: the module object where the test function is defined in.