@@ -44,10 +44,10 @@ Naming tests
44
44
Tests are referenced by their name in the `depends ` argument. The
45
45
default for this name is the node ID defined by pytest, that is the
46
46
name of the test function, extended by the parameters if applicable.
47
- As these node IDs may become complicated, the name can be overridden
48
- by an explicit ` name ` argument to the marker. The following example
49
- works exactly as the last one, only the test names are explicitely
50
- set:
47
+ In some cases, it's not easy to predict the names of the node IDs.
48
+ For this reason, the name of the tests can be overridden by an
49
+ explicit ` name ` argument to the marker. The following example works
50
+ exactly as the last one, only the test names are explicitely set:
51
51
52
52
.. literalinclude :: ../examples/named.py
53
53
@@ -100,3 +100,9 @@ Tests `test_c` and `test_d` set their dependencies at runtime calling
100
100
of the `request ` pytest fixture, the second argument is the list of
101
101
dependencies. It has the same effect as passing this list as the
102
102
`depends ` argument to the :func: `pytest.mark.dependency ` marker.
103
+
104
+ The present example is certainly somewhat artificial, as the use of
105
+ the :func: `pytest_dependency.depends ` function would not be needed in
106
+ such a simple case. For a more involved example that can not as
107
+ easily be formulated with the static the `depends ` argument, see
108
+ :ref: `advanced-grouping-fixtures `.
0 commit comments