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

Function test_mark_mro

testing/test_mark.py:1218–1239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1216
1217
1218def test_mark_mro() -> None:
1219 xfail = pytest.mark.xfail
1220
1221 @xfail("a")
1222 class A:
1223 pass
1224
1225 @xfail("b")
1226 class B:
1227 pass
1228
1229 @xfail("c")
1230 class C(A, B):
1231 pass
1232
1233 from _pytest.mark.structures import get_unpacked_marks
1234
1235 all_marks = get_unpacked_marks(C)
1236
1237 assert all_marks == [xfail("b").mark, xfail("a").mark, xfail("c").mark]
1238
1239 assert get_unpacked_marks(C, consider_mro=False) == [xfail("c").mark]
1240
1241
1242# @pytest.mark.issue("https://github.com/pytest-dev/pytest/issues/10447")

Callers

nothing calls this directly

Calls 1

get_unpacked_marksFunction · 0.90

Tested by

no test coverage detected