If I understand what you mean, coverage.py won't indentify the lines in the doctests as executable. This is because they aren't executable: it's the doctest module that pre-processes the docstring and executes it.
Or do you mean that your product code executed by doctests is not identified as executed?
If the first, I wouldn't have thought this would be a problem, since doctests don't typically include conditionals that would make coverage testing important.
If the latter, please provide a small code sample.
You're right, it wouldn't make sense to expect the doctest lines themselves to show up as covered.
The problem I encountered was that lines of code tested with doctest were not being highlighted correctly. I will try to work up an example for you.
Incidentally, I've been trying out nose for tests, which as you probably know uses coverage.py for its coverage reports. nosetests has an option to include doctest test runs when calculating covered code. This did what I expected in the first place. So maybe I am expecting it to be coverage.py's job when it really is up to something like nose. I'm still a rookie at all of this. :-)
1 items had no tests:
1 items passed all tests:
3 tests in __main__.return_arg_or_void
3 tests in 2 items.
3 passed and 0 failed.
When you annotate the file with coverage annotate -d res check_doctest_coverage.py