Skip to content

sphinx.ext.doctest: Show only failing tests (hide summary for passing) #8654

@astromatt

Description

@astromatt

My documentation 1 has thousands of doctests (lines starting with >>>) in hundreds of modules.

  1. Can you please provide an option to display only failing tests?
    Currently my output is flooded by messages like 2:
Document: type/str
------------------
1 items passed all tests:
  81 tests in default
81 tests in 1 items.
81 passed and 0 failed.
Test passed.

Document: type/str-methods
--------------------------
1 items passed all tests:
 220 tests in default
220 tests in 1 items.
220 passed and 0 failed.
Test passed.

If there is an error, you have to scroll through very long output until you find it.

  1. Very often failing test line number (in file) are incorrect.
    If I indent code block, line numbers are not displayed at all (they appears as question marks ?).

  2. Is there a chance for this to work with Markdown (recommonmark)?
    I found, that if you put eval_rst code fence 3, tests are executed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions