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

Method iter_markers

src/_pytest/nodes.py:330–336  ·  view source on GitHub ↗

Iterate over all markers of the node. :param name: If given, filter the results by the name attribute. :returns: An iterator of the markers of the node.

(self, name: str | None = None)

Source from the content-addressed store, hash-verified

328 self.own_markers.insert(0, marker_.mark)
329
330 def iter_markers(self, name: str | None = None) -> Iterator[Mark]:
331 """Iterate over all markers of the node.
332
333 :param name: If given, filter the results by the name attribute.
334 :returns: An iterator of the markers of the node.
335 """
336 return (x[1] for x in self.iter_markers_with_node(name=name))
337
338 def iter_markers_with_node(
339 self, name: str | None = None

Callers 14

get_closest_markerMethod · 0.95
evaluate_skip_marksFunction · 0.80
evaluate_xfail_marksFunction · 0.80
copy_exampleMethod · 0.80
catch_warnings_for_itemFunction · 0.80
pytest_generate_testsFunction · 0.80
pytest_generate_testsMethod · 0.80
from_itemMethod · 0.80
deselect_by_markFunction · 0.80

Calls 1

Tested by 5

copy_exampleMethod · 0.64
assert_markersMethod · 0.64
test_addmarker_orderFunction · 0.64