Chris Jerdonek added the comment:

> Might it be simpler to run doctest over the rst file from the relevant 
> unittest?  (Perhaps with help from test.support.)

If I understand correctly, do you mean for example that 
Lib/test/test_textwrap.py could be responsible for loading the doctests in 
Doc/library/textwrap.rst?

One problem with this approach is that the *.rst files are not in one-to-one 
correspondence with unittest files in Lib/test, etc.  For example, there are 
folders of *.rst files that may not correspond to any unit test files (e.g. the 
tutorial folder).  It also introduces more coupling because the unit tests 
would now have to know about the existence of the Doc/*.rst files (though this 
could be a nice addition as it would let you run the doctests for a module 
along with its unit tests if you wanted to run tests only for a particular 
module).

Or did you mean something else?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15629>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to