-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing DocTestRunner and DocTestCase in doctest #43657
Comments
DocTestRunner can be modified by end users to override Similarly, DocTestCase can be extended to override However, when a DocTestSuite is used to discover This patch (against svn revision 46884 of By default, DocTestSuite will continue to instantiate |
This looks good to me. Could you add some tests (to Lib/test/test_doctest.py) and update the docs (Doc/lib/libdoctest.tex)? Thanks for your contribution! |
The patch appears to be way out of date. Is there any interest in the concept of this patch, has something similar already been done or what? |
It's still a problem AFAICT. Level of interest is a different matter. Django has needed this since 2006, so we've always shipped a locally modified copy of the doctest module. That said, Django is in the process of moving away from using and recommending doctests, so there's a good chance that we'll be deprecating our local copy in the near future. There's still value in the idea -- it provides configuration points that are consistent and reasonable -- but Django's need for this set of changes is waning. |
I think this would be useful as well. For example, it would let one more easily get finer-grained test result data (e.g. to the level of doctest examples rather than just the TestCase level). Without this, I needed to monkey patch. The previously attached patch enhances DocTestSuite. I think DocFileSuite should receive the same treatment (the case I was more interested in myself -- cf. http://bugs.python.org/issue15629#msg170447 ). |
I've updated patch to work with current trunk and added new params to doctest documentation. |
I like the patch but please add tests also. |
The attached file contains a simple test for this code to make sure the test runner is being applied. I've never submitted anything before, so it might be totally naive. |
I would like to help on this issue. |
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: