docs: improve --lfnf docs to make functionality more clear
This commit is contained in:
parent
b98d293fc0
commit
66e7a1f6bf
|
@ -185,6 +185,9 @@ using the ``--last-failed-no-failures`` option, which takes one of the following
|
||||||
pytest --last-failed --last-failed-no-failures all # run all tests (default behavior)
|
pytest --last-failed --last-failed-no-failures all # run all tests (default behavior)
|
||||||
pytest --last-failed --last-failed-no-failures none # run no tests and exit
|
pytest --last-failed --last-failed-no-failures none # run no tests and exit
|
||||||
|
|
||||||
|
The ``--last-failed-no-failures`` option governs the behavior of ``--if``.
|
||||||
|
Default ``all`` runs all tests with no known failures. ``none`` avoids tests and exits successfully when there are no known failures.
|
||||||
|
|
||||||
The new config.cache object
|
The new config.cache object
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1894,7 +1894,10 @@ All the command-line flags can be obtained by running ``pytest --help``::
|
||||||
--lfnf={all,none}, --last-failed-no-failures={all,none}
|
--lfnf={all,none}, --last-failed-no-failures={all,none}
|
||||||
Determines whether to execute tests when there
|
Determines whether to execute tests when there
|
||||||
are no previously (known) failures or when no
|
are no previously (known) failures or when no
|
||||||
cached ``lastfailed`` data was found
|
cached ``lastfailed`` data was found.
|
||||||
|
This option governs the behavior of ``--if``.
|
||||||
|
Default ``all`` runs all tests with no known failures.
|
||||||
|
``none`` avoids tests and exits if no failures.
|
||||||
--sw, --stepwise Exit on test failure and continue from last failing
|
--sw, --stepwise Exit on test failure and continue from last failing
|
||||||
test next time
|
test next time
|
||||||
--sw-skip, --stepwise-skip
|
--sw-skip, --stepwise-skip
|
||||||
|
|
|
@ -500,7 +500,10 @@ def pytest_addoption(parser: Parser) -> None:
|
||||||
choices=("all", "none"),
|
choices=("all", "none"),
|
||||||
default="all",
|
default="all",
|
||||||
help="Determines whether to execute tests when there are no previously (known)"
|
help="Determines whether to execute tests when there are no previously (known)"
|
||||||
"failures or when no cached ``lastfailed`` data was found",
|
"failures or when no cached ``lastfailed`` data was found."
|
||||||
|
"This option governs the behavior of ``--if``."
|
||||||
|
"Default ``all`` runs all tests with no known failures."
|
||||||
|
"``none`` avoids tests and exits if no failures.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue