File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ Reference
11
11
for the test may be set in the depends argument.
12
12
13
13
:param name: the name of the test to be used for referencing by
14
- dependent tests. If not set, it defaults to the internal name
15
- used in pytest, that is the name of the test function,
14
+ dependent tests. If not set, it defaults to the node ID
15
+ defined by pytest, that is the name of the test function,
16
16
extended by the parameters if applicable.
17
17
:type name: :class: `str `
18
18
:param depends: dependencies, a list of names of tests that this
Original file line number Diff line number Diff line change @@ -38,11 +38,12 @@ Naming tests
38
38
------------
39
39
40
40
Tests are referenced by their name in the `depends ` argument. The
41
- default for this name is the internal name used in pytest, that is the
41
+ default for this name is the node ID defined by pytest, that is the
42
42
name of the test function, extended by the parameters if applicable.
43
- As these names may become complicated, they can be overridden by an
44
- explicit `name ` argument to the marker. The following example works
45
- exactly as the last one, only the test names are explicitely set:
43
+ As these node IDs may become complicated, the name can be overridden
44
+ by an explicit `name ` argument to the marker. The following example
45
+ works exactly as the last one, only the test names are explicitely
46
+ set:
46
47
47
48
.. literalinclude :: ../examples/named.py
48
49
Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ def checkDepend(self, depends):
65
65
def depends (request , other ):
66
66
"""Add dependency on other test.
67
67
68
- Call pytest.skip() unless a successful outcome of all of the tests
69
- in other has been registered previously. This has the same effect
70
- as the `depends` keyword argument to the ` dependency` marker. In
71
- contrast to the marker, this function may be called at runtime
72
- during a test.
68
+ Call pytest.skip() unless a successful outcome of all of the tests in
69
+ other has been registered previously. This has the same effect as
70
+ the `depends` keyword argument to the :func:`pytest.mark. dependency`
71
+ marker. In contrast to the marker, this function may be called at
72
+ runtime during a test.
73
73
74
74
:param request: the value of the `request` pytest fixture related
75
75
to the current test.
You can’t perform that action at this time.
0 commit comments