Skip to content

Commit 13e594a

Browse files
fixup: mark mro test reformatt
1 parent 4e7486d commit 13e594a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

testing/test_mark.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,23 +1112,24 @@ def test_foo():
11121112

11131113

11141114
def test_mark_mro():
1115-
@pytest.mark.xfail("a")
1115+
xfail = pytest.mark.xfail
1116+
1117+
@xfail("a")
11161118
class A:
11171119
pass
11181120

1119-
@pytest.mark.xfail("b")
1121+
@xfail("b")
11201122
class B:
11211123
pass
11221124

1123-
@pytest.mark.xfail("c")
1125+
@xfail("c")
11241126
class C(A, B):
11251127
pass
11261128

11271129
from _pytest.mark.structures import get_unpacked_marks
11281130

1129-
all_marks = list(get_unpacked_marks(C))
1131+
all_marks = get_unpacked_marks(C)
11301132

1131-
nk = [(x.name, x.args[0]) for x in all_marks]
1132-
assert nk == [("xfail", "c"), ("xfail", "a"), ("xfail", "b")]
1133+
assert all_marks == [xfail("c").mark, xfail("a").mark, xfail("b").mark]
11331134

1134-
assert list(get_unpacked_marks(C, consider_mro=False)) == []
1135+
assert get_unpacked_marks(C, consider_mro=False) == [pytest.mark.xfail("c").mark]

0 commit comments

Comments
 (0)