MCPcopy Create free account
hub / github.com/pytest-dev/pytest / getfixtureinfo

Method getfixtureinfo

src/_pytest/fixtures.py:1452–1468  ·  view source on GitHub ↗
(
        self, node: nodes.Node, func, cls, funcargs: bool = True
    )

Source from the content-addressed store, hash-verified

1450 return parametrize_argnames
1451
1452 def getfixtureinfo(
1453 self, node: nodes.Node, func, cls, funcargs: bool = True
1454 ) -> FuncFixtureInfo:
1455 if funcargs and not getattr(node, "nofuncargs", False):
1456 argnames = getfuncargnames(func, name=node.name, cls=cls)
1457 else:
1458 argnames = ()
1459
1460 usefixtures = tuple(
1461 arg for mark in node.iter_markers(name="usefixtures") for arg in mark.args
1462 )
1463 initialnames = usefixtures + argnames
1464 fm = node.session._fixturemanager
1465 initialnames, names_closure, arg2fixturedefs = fm.getfixtureclosure(
1466 initialnames, node, ignore_args=self._get_direct_parametrize_args(node)
1467 )
1468 return FuncFixtureInfo(argnames, initialnames, names_closure, arg2fixturedefs)
1469
1470 def pytest_plugin_registered(self, plugin: _PluggyPlugin) -> None:
1471 nodeid = None

Callers 3

_setup_fixturesFunction · 0.80
__init__Method · 0.80
_fill_fixtures_implFunction · 0.80

Calls 5

getfuncargnamesFunction · 0.90
FuncFixtureInfoClass · 0.85
iter_markersMethod · 0.80
getfixtureclosureMethod · 0.80

Tested by 1

_setup_fixturesFunction · 0.64