Skip to content

Commit cde8fc4

Browse files
committed
Merge branch 'doc'
2 parents 7e491bb + b262ec7 commit cde8fc4

File tree

3 files changed

+48
-21
lines changed

3 files changed

+48
-21
lines changed

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252

5353
+ Issue #15: tests fail with pytest 3.3.0.
5454

55+
+ Issue #8: document incompatibility with parallelization in
56+
pytest-xdist.
57+
5558
+ Clarify in the documentation that Python 3.1 is not officially
5659
supported because pytest 2.8 does not support it. There is no
5760
known issue with Python 3.1 though.

doc/src/configuration.rst

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,46 @@ This section explains configuration options for pytest-dependency, but
55
also options for pytest itself or other plugins that are recommended
66
for the use with pytest-dependency.
77

8+
Notes on configuration for other plugins
9+
----------------------------------------
10+
11+
pytest-xdist
12+
Test run parallelization in pytest-xdist is incompatible with
13+
pytest-dependency, see :ref:`install-other-packages`. By default,
14+
parallelization is disabled in pytest-xdist (`--dist=no`). You are
15+
advised to leave this default.
16+
817
Configuration file options
918
--------------------------
1019

1120
Configuration file options can be set in the `ini file`.
1221

13-
minversion
14-
This is a builtin configuration option of pytest itself. Since
15-
pytest-dependency requires pytest 2.8.0 or newer, it is
16-
recommended to set this option accordingly.
17-
18-
automark_dependency
19-
This is a flag. If set to `False`, the default, the outcome of
20-
a test will only be registered if the test has been decorated
21-
with the :func:`pytest.mark.dependency` marker. As a results,
22-
all tests, the dependencies and the dependent tests must be
23-
decorated. If set to `True`, the outcome of all tests will be
24-
registered. It has the same effect as if all tests are
25-
implicitly decorated with :func:`pytest.mark.dependency`.
22+
minversion
23+
This is a builtin configuration option of pytest itself. Since
24+
pytest-dependency requires pytest 2.8.0 or newer, it is recommended
25+
to set this option accordingly, either to 2.8.0 or to a newer
26+
version, if required by your test code.
27+
28+
automark_dependency
29+
This is a flag. If set to `False`, the default, the outcome of a
30+
test will only be registered if the test has been decorated with
31+
the :func:`pytest.mark.dependency` marker. As a results, all
32+
tests, the dependencies and the dependent tests must be decorated.
33+
If set to `True`, the outcome of all tests will be registered. It
34+
has the same effect as if all tests are implicitly decorated with
35+
:func:`pytest.mark.dependency`.
2636

2737
Command line options
2838
--------------------
2939

3040
The following command line options are added by pytest.dependency:
3141

32-
`--ignore-unknown-dependency`
33-
By default, a test will be skipped unless all the dependencies
34-
have been run successful. If this option is set, a test will be
35-
skipped if any of the dependencies has been skipped or failed.
36-
E.g. dependencies that have not been run at all will be ignored.
42+
`--ignore-unknown-dependency`
43+
By default, a test will be skipped unless all the dependencies have
44+
been run successful. If this option is set, a test will be skipped
45+
if any of the dependencies has been skipped or failed.
46+
E.g. dependencies that have not been run at all will be ignored.
3747

38-
This may be useful if you run only a subset of the testsuite and
39-
some tests in the selected set are marked to depend on other
40-
tests that have not been selected.
48+
This may be useful if you run only a subset of the testsuite and
49+
some tests in the selected set are marked to depend on other tests
50+
that have not been selected.

doc/src/install.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ System requirements
1212
(Python 3.1 is not supported by pytest 2.8.0 itself.)
1313

1414

15+
.. _install-other-packages:
16+
17+
Interaction with other packages
18+
-------------------------------
19+
20+
pytest-xdist
21+
pytest-xdist features test run parallelization, e.g. distributing
22+
tests over separate processes that run in parallel. This is based
23+
on the assumption that the tests can be run independent of each
24+
other. Obviously, if you are using pytest-dependency, this
25+
assumption is not valid. Thus, pytest-dependency will only work if
26+
you do not enable parallelization in pytest-xdist.
27+
28+
1529
Download
1630
--------
1731

0 commit comments

Comments
 (0)