classification
Title: Extra configurability for doctest TestCases
Type: feature request Stage: test needed
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: collinwinter, freakboy (2)
Priority: normal Keywords: easy, patch

Created on 2006-07-12 08:47 by freakboy, last changed 2009-03-30 05:05 by ajaksu2.

Files
File name Uploaded Description Edit Remove
doctest-configuration.diff freakboy, 2006-07-12 08:47 Patch to allow extra customization of DocTestSuite
Messages (2)
msg50676 - (view) Author: Russell Keith-Magee (freakboy) Date: 2006-07-12 08:47
DocTestRunner can be modified by end users to override
default testing behaviour when executing doctests. 

Similarly, DocTestCase can be extended to override
default setup/teardown behaviour. 

However, when a DocTestSuite is used to discover
doctests, it is not possible to specify a user-modified
Runner or TestCase.

This patch (against svn revision 46884 of
Lib/doctest.py) enables end users to specify the class
that is used to construct DocTest test cases, and the
runner that is used to run DocTest test cases. 

By default, DocTestSuite will continue to instantiate
DocTestRunner and DocTestCase instances as before. 
msg50677 - (view) Author: Collin Winter (collinwinter) Date: 2007-03-07 20:08
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!
History
Date User Action Args
2009-03-30 05:05:54ajaksu2setkeywords: + easy
stage: test needed
type: feature request
versions: + Python 3.1, Python 2.7, - Python 2.5
2006-07-12 08:47:04freakboycreate