Add `doctest_fail_fast` option to exit after the first failed test (#13332)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
Till HoffmannandAdam Turner authored and GitHub committed 2025-03-24 19:44:16 +00:00
1 parent d9b20d0553
commit 5831b3eeaf
7 files changed
+88 -12

No files matched your search

+8
View File
@@ -452,3 +452,11 @@ The doctest extension uses the following configuration values:
Also, removal of ``<BLANKLINE>`` and ``# doctest:`` options only works in
:rst:dir:`doctest` blocks, though you may set :confval:`trim_doctest_flags`
to achieve that in all code blocks with Python console content.
.. confval:: doctest_fail_fast
:type: :code-py:`bool`
:default: :code-py:`False`
Exit when the first failure is encountered.
.. versionadded:: 8.3