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

Function test_addmarker_order

testing/test_mark.py:1133–1144  ·  testing/test_mark.py::test_addmarker_order
(pytester)

Source from the content-addressed store, hash-verified

1131
1132
1133def test_addmarker_order(pytester) -> None:
1134 session = mock.Mock()
1135 session.own_markers = []
1136 session.parent = None
1137 session.nodeid = class="st">""
1138 session.path = pytester.path
1139 node = Node.from_parent(session, name=class="st">"Test")
1140 node.add_marker(class="st">"foo")
1141 node.add_marker(class="st">"bar")
1142 node.add_marker(class="st">"baz", append=False)
1143 extracted = [x.name for x in node.iter_markers()]
1144 assert extracted == [class="st">"baz", class="st">"foo", class="st">"bar"]
1145
1146
1147@pytest.mark.filterwarnings(class="st">"ignore")

Callers

nothing calls this directly

Calls 3

add_markerMethod · 0.80
iter_markersMethod · 0.80
from_parentMethod · 0.45

Tested by

no test coverage detected