Message168214
Chris isn't suggesting changing the behavior, just the error message. I agree with his change for exactly the reason you say: currently doctest doesn't complain if a module does have docstrings but none of those docstrings are tests. So a module could have no tests without the error being raised.
However, I suspect that the current behavior is a bug. I suspect the intent was to raise an error if there were no *tests*, not if there were no docstrings. I don't think it is a bug that should be fixed, though. I have a couple of test runners in various projects that run doctest on *all* modules, the goal being to pick up any doctests that there are or that I may add, even though not all modules have docstrings that contain doctests. The doctest version of TestCase-based discovery.
So if anything I think this exception should be dropped. If the report is that no tests are run, that should be enough of an indication that something is wrong, without raising an error, as it has been for the case where there are docstrings but no tests (we do not as far as I know have a bug or feature request that the current behavior is inadequate). |
|
Date |
User |
Action |
Args |
2012-08-14 17:17:44 | r.david.murray | set | recipients:
+ r.david.murray, asvetlov, chris.jerdonek |
2012-08-14 17:17:44 | r.david.murray | set | messageid: <1344964664.91.0.456613261791.issue14649@psf.upfronthosting.co.za> |
2012-08-14 17:17:44 | r.david.murray | link | issue14649 messages |
2012-08-14 17:17:43 | r.david.murray | create | |
|