From abbd7c30a43b56106fb323892311b9d4ba7a3105 Mon Sep 17 00:00:00 2001 From: Josh Holland Date: Sat, 11 Aug 2018 20:48:55 +0100 Subject: [PATCH] Unhide documentation for metafunc.config Fixes #3746. --- changelog/3746.doc.rst | 1 + src/_pytest/python.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/3746.doc.rst 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.