[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows, .rst files are not part of the install, so running doctests on .rst files cannot be a required part of the standard regrtest. -- nosy: +terry.reedy versions: +Python 3.4 ___ Python tracker

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would like the chance to try implementing this without depending on Sphinx and "make doctest". I don't think it would take much work, and it would let us leverage and hook into regrtest's existing options (like test selection by name). I am also okay with

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-15 Thread Eli Bendersky
Eli Bendersky added the comment: I think implementing this is very important, and +1 to Georg's suggestion, because no one is suddenly going to convert KLOCs of code samples to be testable (many code samples are partial, and will need to be completed in one way or another to be actually runnab

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-13 Thread R. David Murray
R. David Murray added the comment: That's exactly what Georg's suggestion is about. Sphinx does have a way to mark doctest snippets as "run this", "don't run this". I believe that requires using 'make doctest' as the runner, but I already think that is the way to go, as I said before. -

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-13 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Glenn Linderman
Glenn Linderman added the comment: Another idea would be to make a notation that looks exactly* like doctests for documentation purposes, but that doctest would not run. Then, non-runnable doctests could be skipped, and runnable ones could be run. This would help keep the runnable code in the

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread R. David Murray
R. David Murray added the comment: The point of running the doctests in the docs to to make sure the *docs* are correct, not to make sure Python is correct. So IMO adding them to regrtest is much more trouble than the tiny benefit it would produce for test coverage. On the other hand, having

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Éric Araujo
Éric Araujo added the comment: Using Python 3 to run Sphinx is tracked in #10224. I thought there was already an issue to make the doctests runnable but can't find it, maybe it was only a discussion on a mailing list a year or two ago. -- nosy: +eric.araujo __

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Georg Brandl
Georg Brandl added the comment: Yeah, once we switch around to using the build Python for this... -- ___ Python tracker ___ ___ Python

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: An example from the output of "make doctest" which fails because Python 2.x is being used: ** File "library/multiprocessing.rst", line 453, in default Failed example: print(p, p.is_alive()

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > the occasional typos can be found by simply run `make doctest` every once > in a while). But doesn't "make doctest" attempt to run the doctests using Python 2.x (because Sphinx does not support Python 3.x). -- _

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Georg Brandl
Georg Brandl added the comment: One possibility to avoid tons and tons of failures that have to be fixed is to convert working doctests to the explicit syntax .. doctest:: blah and set doctest_test_doctest_blocks to False in the Sphinx conf.py. -- nosy: +georg.brandl

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
Ezio Melotti added the comment: > Can you provide reasons? Regrtest takes already a few minutes to run, adding these tests will make it even slower and the tradeoff might not be worthwhile (I'm assuming that most of the doctests are basic examples that are already well tested, and the occasio

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
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 doct

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I'm not sure running these tests as part of regrtest is a good idea. Can you provide reasons? -- ___ Python tracker ___ _

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure running these tests as part of regrtest is a good idea. Fixing and/or marking the doctests is a good idea, and having a `make doctest` that reports no error is a desirable goal. When `make doctest` works we could think about adding a regrtest option

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
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

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: One option for whitelisting files would be to subclass doctest.DocTestParser and pass an instance as the parser argument to doctest.DocFileSuite: http://docs.python.org/dev/library/doctest.html#doctest.DocFileSuite The custom parser could look for the per-file

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Might it be simpler to run doctest over the rst file from the relevant unittest? (Perhaps with help from test.support.) -- nosy: +sbt ___ Python tracker

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to start running (at least some of) the doctests in the Doc/ folder's *.rst files as part of regrtest. We will need a whitelist mechanism to tell regrtest which files to process since currently many doctests are not runnable (e.g. some kind of