MCPcopy
hub / github.com/pytest-dev/pytest / _getusefixturesnames

Method _getusefixturesnames

src/_pytest/fixtures.py:1842–1851  ·  view source on GitHub ↗

Return the names of usefixtures fixtures applicable to node.

(self, node: nodes.Item)

Source from the content-addressed store, hash-verified

1840 yield from nodeid_basenames
1841
1842 def _getusefixturesnames(self, node: nodes.Item) -> Iterator[str]:
1843 """Return the names of usefixtures fixtures applicable to node."""
1844 for marker_node, mark in node.iter_markers_with_node(name="usefixtures"):
1845 if not mark.args:
1846 marker_node.warn(
1847 PytestWarning(
1848 f"usefixtures() in {node.nodeid} without arguments has no effect"
1849 )
1850 )
1851 yield from mark.args
1852
1853 def getfixtureclosure(
1854 self,

Callers 1

getfixtureinfoMethod · 0.95

Calls 3

PytestWarningClass · 0.90
warnMethod · 0.45

Tested by

no test coverage detected