Issue #1487 new

Add unittest integration

Anonymous created an issue

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.

Comments (2)

  1. Log in to comment