Skip to content

Commit a8cb125

Browse files
committed
Add test for the logical combinations of dependencies example
1 parent 5adffde commit a8cb125

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_09_examples_advanced.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,22 @@ def test_all_params(ctestdir):
133133
.*::test_e\[def\] XFAIL(?:\s+\(.*\))?
134134
.*::test_f SKIPPED(?:\s+\(.*\))?
135135
""")
136+
137+
138+
def test_or_dependency(ctestdir):
139+
"""Logical combinations of dependencies
140+
"""
141+
with get_example("or_dependency.py").open("rt") as f:
142+
ctestdir.makepyfile(f.read())
143+
result = ctestdir.runpytest("--verbose")
144+
result.assert_outcomes(passed=5, skipped=1, failed=0, xfailed=2)
145+
result.stdout.re_match_lines(r"""
146+
.*::test_ap PASSED
147+
.*::test_ax XFAIL(?:\s+\(.*\))?
148+
.*::test_bp PASSED
149+
.*::test_bx XFAIL(?:\s+\(.*\))?
150+
.*::test_c SKIPPED(?:\s+\(.*\))?
151+
.*::test_d PASSED
152+
.*::test_e PASSED
153+
.*::test_f PASSED
154+
""")

0 commit comments

Comments
 (0)