Merge pull request #3807 from anowlcalledjosh/metafunc-config-doc

Unhide documentation for metafunc.config
This commit is contained in:
Anthony Sottile 2018-08-13 15:32:43 -07:00 committed by GitHub
commit 87a99275fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog/3746.doc.rst Normal file
View File

@ -0,0 +1 @@
Add documentation for ``metafunc.config`` that had been mistakenly hidden.

View File

@ -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.