Skip to content

Add unittest integration #1487

@shimizukawa

Description

@shimizukawa

Unit testing frameworks, although they all (unittest, py.test, nose) have ways of running standard doctests in both text files and docstrings, currently appear to have no way to run Sphinx doctests that use “testcode/testoutput” blocks. The documentation for sphinx.ext.doctest should be expanded to explain how to expose such tests as bare normal unittest objects so that all test frameworks can consume them. Currently, unless I am missing something, everyone who buys into Sphinx’s great “testcode/testoutput” mechanism of formatting tests — which saves so much hassle involving prompts that other doctest formats incur — break the ability to have a single test suite, and instead have to remember to run both their normal test runner then also “make doctest” in their documentation directory.


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions