File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change
1
+ $ py.test -rsx basic.py
2
+ ============================= test session starts ==============================
3
+ platform linux -- Python 3.4.6, pytest-2.8.7, py-1.4.30, pluggy-0.3.1
4
+ rootdir: /home/user/pytest-dependency-0.2, inifile:
5
+ plugins: dependency-0.2
6
+ collected 5 items
7
+
8
+ basic.py x.s.s
9
+ =========================== short test summary info ============================
10
+ SKIP [1] /usr/lib/python3.4/site-packages/pytest_dependency.py:65: test_e depends on test_c
11
+ SKIP [1] /usr/lib/python3.4/site-packages/pytest_dependency.py:65: test_c depends on test_a
12
+ XFAIL basic.py::test_a
13
+ deliberate fail
14
+
15
+ ================ 2 passed, 2 skipped, 1 xfailed in 0.02 seconds ================
Original file line number Diff line number Diff line change @@ -13,9 +13,13 @@ Consider the following example test module:
13
13
All the tests are decorated with :func: `pytest.mark.dependency `. This
14
14
will cause the test results to be registered internally and thus other
15
15
tests may depend on them. The list of dependencies of a test may be
16
- set in the optional `depends ` argument to the marker. The first test
17
- has deliberately been set to fail to illustrate the effect. We will
18
- get the following resuts:
16
+ set in the optional `depends ` argument to the marker. Running this
17
+ test, we will get the following result:
18
+
19
+ .. literalinclude :: ../examples/basic.out
20
+
21
+ The first test has deliberately been set to fail to illustrate the
22
+ effect. We will get the following resuts:
19
23
20
24
`test_a `
21
25
deliberatly fails.
You can’t perform that action at this time.
0 commit comments