From e121c50235bfab686df4ad60c0b150801832aee9 Mon Sep 17 00:00:00 2001 From: Sean Malloy Date: Mon, 28 Aug 2023 16:16:50 -0700 Subject: [PATCH] docs: quick change --- doc/en/how-to/cache.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/en/how-to/cache.rst b/doc/en/how-to/cache.rst index 88a149990..685ab314e 100644 --- a/doc/en/how-to/cache.rst +++ b/doc/en/how-to/cache.rst @@ -180,10 +180,17 @@ This option governs the behavior of ``--last-failed``. Determines whether to execute tests when there are no previously (known) failures or when no cached ``lastfailed`` data was found. +There are two options: + +* ``all``: when there are no known test failures, runs all tests (the full test suite). This is the default. +* ``none``: when there are no known test failures, just emits a message stating this and exit successfully. + +Example: + .. code-block:: bash - pytest --last-failed --last-failed-no-failures all # when there are no known test failures, runs the full test suite again (default behavior) - pytest --last-failed --last-failed-no-failures none # when there are no known test failures, runs no tests, emits a message about no known failures and exits successfully + pytest --last-failed --last-failed-no-failures all # runs the full test suite (default behavior) + pytest --last-failed --last-failed-no-failures none # runs no tests and exits successfully The new config.cache object --------------------------------