Skip to content

Commit 5e220bd

Browse files
committed
Add output from the example basic.py to the documentation.
1 parent b68f602 commit 5e220bd

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

doc/examples/basic.out

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 ================

doc/src/usage.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ Consider the following example test module:
1313
All the tests are decorated with :func:`pytest.mark.dependency`. This
1414
will cause the test results to be registered internally and thus other
1515
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:
1923

2024
`test_a`
2125
deliberatly fails.

0 commit comments

Comments
 (0)