[Patches] [ python-Patches-1244929 ] hide tests from TestProgram
SourceForge.net
noreply at sourceforge.net
Sat Mar 10 16:13:50 CET 2007
Patches item #1244929, was opened at 2005-07-25 23:54
Message generated for change (Settings changed) made by collinwinter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1244929&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
>Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Eric Huss (ehuss)
>Assigned to: Collin Winter (collinwinter)
Summary: hide tests from TestProgram
Initial Comment:
The TestProgram class will find all tests in the file
based on whether or not they are subclassed from
TestCase. It is not possible to prevent TestProgram
from including tests, such as base classes.
For example, have BaseTest(unittest.TestCase) class
that implements several test functions. However, these
test functions can not operate correctly on their
own...the class must be subclassed for proper operation
(such as TestBlah(BaseTest)).
This patch changes the "auto find" feature to ignore any
classes that start with an underscore, allowing you to
define base classes in the same file, but not have their
tests run.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1244929&group_id=5470
More information about the Patches
mailing list