I have just discovered that sphinx supports running doctests embedded in ReST documentation. It looks like it is as simple as "cd Doc; make doctest". The result, however is not encouraging: $ make doctest ... Doctest summary =============== 1162 tests 262 failures in tests 0 failures in setup code ...