Ezio Melotti added the comment:

> 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 advantage of this is that I could explicitly add a test in test_textwrap.py 
that loads the doctests in textwrap.rst and runs them.
This would allow me to decide if those tests should be run or not, and which 
ones are runnable.  If I know that textwrap.rst has no runnable tests I won't 
add the test, so by simply running test_textwrap I would be running all the 
tests I want/need to run.

OTOH this has disadvantages too.  If the tests are loaded explicitly it means 
that every test file that wants to load the doctests should be modified.  Even 
if foo.rst has no runnable doctests and no test to load them is added to 
test_foo.py, a `make doctest` might still include the file unless we mark it in 
some way (either by a module-wide directive, or by marking all the individual 
snippets of code).

----------

_______________________________________
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