@@ -245,8 +245,7 @@ By default, tests with no ``order`` mark are executed after all tests with
245
245
positive ordinal numbers (or the respective names), and before tests with
246
246
negative ordinal numbers. The order of these tests in relationship to each
247
247
other is not changed. This behavior may slightly change if the option
248
- :ref: `sparse-ordering ` is used and the ordinals are not contiguous (see
249
- below).
248
+ :ref: `sparse-ordering ` is used and the ordinals are not contiguous.
250
249
251
250
252
251
Order relative to other tests
@@ -341,7 +340,7 @@ The `pytest-dependency <https://pypi.org/project/pytest-dependency/>`__
341
340
plugin also manages dependencies between tests (skips tests that depend
342
341
on skipped or failed tests), but currently doesn't do any ordering. If you
343
342
want to execute the tests in a specific order to each other, you can use
344
- ``pytest-ordering ``. If you want to skip or xfail tests dependent on other
343
+ ``pytest-order ``. If you want to skip or xfail tests dependent on other
345
344
tests you can use ``pytest-dependency ``. If you want to have both behaviors
346
345
combined, you can use both plugins together with the
347
346
option :ref: `order-dependencies `--see below for more information.
@@ -352,23 +351,6 @@ There are a few command line options that change the behavior of the
352
351
plugin. As with any pytest option, you can add the options to your
353
352
``pytest.ini `` if you want to have them applied to all tests automatically.
354
353
355
- ``--indulgent-ordering ``
356
- ------------------------
357
- You may sometimes find that you want to suggest an ordering of tests, while
358
- allowing it to be overridden for good reason. For example, if you run your test
359
- suite in parallel and have a number of tests which are particularly slow, it
360
- might be desirable to start those tests running first, in order to optimize
361
- your completion time. You can use the ``pytest-order `` plugin to inform pytest
362
- of this.
363
-
364
- Now suppose you also want to prioritize tests which failed during the
365
- previous run, by using the ``--failed-first `` option. By default,
366
- pytest-order will override the ``--failed-first `` order, but by adding the
367
- ``--indulgent-ordering `` option, you can ask pytest to run the sort from
368
- pytest-order *before * the sort from ``--failed-first ``, allowing the failed
369
- tests to be sorted to the front (note that in pytest versions from 6.0 on,
370
- this seems not to be needed anymore, at least in this specific case).
371
-
372
354
.. _order-scope :
373
355
374
356
``--order-scope ``
@@ -389,6 +371,23 @@ separate test functions, these test functions are handled separately from the
389
371
test classes. If a module has no test classes, the effect is the same as
390
372
if using ``--order-scope=module ``.
391
373
374
+ ``--indulgent-ordering ``
375
+ ------------------------
376
+ You may sometimes find that you want to suggest an ordering of tests, while
377
+ allowing it to be overridden for good reason. For example, if you run your test
378
+ suite in parallel and have a number of tests which are particularly slow, it
379
+ might be desirable to start those tests running first, in order to optimize
380
+ your completion time. You can use the ``pytest-order `` plugin to inform pytest
381
+ of this.
382
+
383
+ Now suppose you also want to prioritize tests which failed during the
384
+ previous run, by using the ``--failed-first `` option. By default,
385
+ pytest-order will override the ``--failed-first `` order, but by adding the
386
+ ``--indulgent-ordering `` option, you can ask pytest to run the sort from
387
+ pytest-order *before * the sort from ``--failed-first ``, allowing the failed
388
+ tests to be sorted to the front (note that in pytest versions from 6.0 on,
389
+ this seems not to be needed anymore, at least in this specific case).
390
+
392
391
.. _sparse-ordering :
393
392
394
393
``--sparse-ordering ``
0 commit comments