@@ -38,7 +38,7 @@ ordering, all configuration options) that are not available in
3838
3939Supported Python and pytest versions
4040------------------------------------
41- ``pytest-order `` supports python 2.7, 3.5 - 3.9 , and pypy/pypy3, and is
41+ ``pytest-order `` supports python 2.7, 3.5 - 3.10 , and pypy/pypy3, and is
4242compatible with pytest 3.7.0 or newer. Note that support for Python 2 will
4343be removed in one of the next versions.
4444
@@ -460,7 +460,7 @@ regardless of the ordinal markers.
460460Several relationships for the same marker
461461~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
462462If you need to order a certain test relative to more than one other test, you
463- can add more than one test name to the ``before `` or ``after marker
463+ can add more than one test name to the ``before `` or ``after `` marker
464464attributes, separated by spaces:
465465
466466.. code :: python
@@ -1016,7 +1016,7 @@ Using pytest-order with other pytest plugins
10161016
10171017Relationship with pytest-dependency
10181018-----------------------------------
1019- The `pytest-dependency < https://pypi.org/project/pytest-dependency/ >`__
1019+ The `pytest-dependency `_
10201020plugin also manages dependencies between tests (skips tests that depend
10211021on skipped or failed tests), but currently doesn't do any ordering. If you
10221022want to execute the tests in a specific order to each other, you can use
@@ -1025,11 +1025,11 @@ tests you can use ``pytest-dependency``. If you want to have both behaviors
10251025combined, you can use both plugins together with the
10261026option :ref: `order-dependencies `, described above.
10271027
1028- Using together with pytest-randomly
1029- -----------------------------------
1028+ Usage with other ordering plugins
1029+ ---------------------------------
10301030There is a number of other pytest plugins that change the order in which tests
10311031are executed, the most widely known probably being
1032- `pytest-randomly < https://pypi.org/project/pytest-randomly/ >`__ , which
1032+ `pytest-randomly `_ , which
10331033executes tests in a random order to avoid unknown test dependencies.
10341034``pytest-order `` should still work with these as long as it is executed
10351035*after * the other plugins (which it should by default, except if you use
@@ -1080,10 +1080,17 @@ The same is true for relative ordering. The tests will be correctly ordered
10801080before and after the tests as configured, but all other tests will be in an
10811081arbitrary order.
10821082
1083+ Note that it does not make much sense to use ordering plugins together that
1084+ have a similar goal as ``pytest-order ``, as for example ``pytest-ordering ``.
1085+ As mentioned, both plugins can co-exist without problems due to the
1086+ different marker names, but using markers of both plugins in the same test
1087+ run is not recommended. One plugin may partially revert the effects of the
1088+ other plugin in unpredictable ways. The same is true for other plugins that
1089+ define the test order.
10831090
10841091Usage with pytest-xdist
10851092-----------------------
1086- The `pytest-xdist < https://pypi.org/project/pytest-xdist/ >`__ plugin
1093+ The `pytest-xdist `_ plugin
10871094schedules tests unordered, and the order configured by ``pytest-order ``
10881095will normally not be preserved. But if we use the ``--dist=loadfile ``
10891096option, provided by ``xdist ``, all tests from one file will be run in the
@@ -1094,3 +1101,8 @@ each group of dependent tests in one file, and call pytest with
10941101
10951102.. toctree ::
10961103 :maxdepth: 2
1104+
1105+
1106+ .. _`pytest-xdist` : https://pypi.org/project/pytest-xdist/
1107+ .. _`pytest-randomly` : https://pypi.org/project/pytest-randomly/
1108+ .. _`pytest-dependency` : https://pypi.org/project/pytest-dependency/
0 commit comments