[tor-bugs] #10036 [Stem]: Investigate using sphinx's doctest module

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Oct 27 18:11:46 UTC 2013


#10036: Investigate using sphinx's doctest module
-------------------------+------------------------
 Reporter:  atagar       |          Owner:  atagar
     Type:  enhancement  |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Stem         |        Version:
 Keywords:  testing      |  Actual Points:
Parent ID:               |         Points:
-------------------------+------------------------
 Presently we're using python's
 [http://docs.python.org/2/library/doctest.html doctest] module in our
 [https://gitweb.torproject.org/stem.git/blob/HEAD:/test/unit/doctest.py
 unit tests], which covers interpretor style examples (those with a '>>>').
 However, this doesn't test examples using sphinx's '::' blocks, which we
 use for most of our examples.

 Our unit tests provide
 [https://gitweb.torproject.org/stem.git/blob/HEAD:/test/unit/tutorial.py
 test coverage for our tutorials], but they're maintained separately from
 the documentation itself so they often go stale if we update tutorials.

 We should investigate using [http://sphinx-doc.org/ext/doctest.html
 sphinx's doctest plugin] or tricks with the python doctest module to get
 test coverage of the '::' sphinx blocks. This will likely require us to
 ask on the python list for ideas...

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10036>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list