You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2014-04-15.00:29:46.123>created_at=<Date2012-09-10.23:54:54.491>labels= ['easy', 'type-bug', 'library']
title='change doctest DocTestSuite not to raise ValueError if no docstrings'updated_at=<Date2014-04-15.00:29:46.110>user='https://github.com/cjerdonek'
Currently, calling doctest.DocTestSuite() raises a ValueError if the module passed to it has no docstrings. This was the subject of bpo-14649.
This issue is to discuss and possibly change DocTestSuite's behavior not to raise an exception in that situation.
In the discussion for bpo-14649 (in particular with R. David Murray), it was acknowledged that the current behavior probably isn't correct or desirable. However, treating the behavior as a bug and fixing it in maintenance branches would have been too big of a change.
Thus, if this change is made, it could be slated for the next feature release.
Hmm. This patch still raises the "has no docstrings" ValueError if "not tests" is True. And because the patch changes the default DocTestFinder, it's possible that the patch changes behavior in non-error use cases.
Why not just return an empty TestSuite if not tests is True? IIRC, this was the conclusion of the bpo-14649 discussion.