Skip to content

Commit 83ffd99

Browse files
committed
Documentation fixes.
1 parent 2952196 commit 83ffd99

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

doc/src/reference.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ Reference
1212

1313
:param name: the name of the test to be used for referencing by
1414
dependent tests. If not set, it defaults to the node ID
15-
defined by pytest, that is the name of the test function,
16-
extended by the parameters if applicable. The name must be
17-
unique in the scope, which is currently the test module.
15+
defined by pytest. The name must be unique.
1816
:type name: :class:`str`
1917
:param depends: dependencies, a list of names of tests that this
2018
test depends on. The test will be skipped unless all of the
@@ -26,6 +24,10 @@ Reference
2624
either `'session'`, `'package'`, `'module'`, or `'class'`.
2725
:type scope: :class:`str`
2826

27+
See Section :ref:`names` for details on the default name if the
28+
`name` argument is not set and on how references in the `depends`
29+
argument must be adapted to the scope.
30+
2931
.. versionchanged:: 0.5.0
3032
the scope parameter has been added.
3133

doc/src/scope.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ turn will be run and succeed. It depends on the test method `test_b`
5353
of class `TestClass` in `tests/test_mod_01.py`, not on the test
5454
function of the same name.
5555

56+
The `scope` argument only affects the references in the `depends`
57+
argument of the marker. It does not matter which scope is set for the
58+
dependencies: the dependency of `test_e` in `tests/test_mod_02.py` on
59+
`test_a` in `tests/test_mod_01.py` is in session scope. It is not
60+
needed to set the scope also for `test_a`.
61+
5662
Note that the references in session scope must use the full node id of
5763
the dependencies. This node id is composed of the module path, the
5864
name of the test class if applicable, and the name of the test,

0 commit comments

Comments
 (0)