I've just uploaded a trio of unittest-related patches: #1550272 (http://python.org/sf/1550272) is a test suite for the mission-critical parts of unittest. #1550273 (http://python.org/sf/1550273) fixes 6 issues uncovered while writing the test suite. Several other items that I raised earlier (http://mail.python.org/pipermail/python-dev/2006-August/068378.html) were judged to be either non-issues or behaviours that, while suboptimal, people have come to rely on. #1550263 (http://python.org/sf/1550263) follows up on an earlier patch I submitted for unittest's docs. This new patch corrects and clarifies numerous sections of the module's documentation. I'd appreciate it if these changes could make it into 2.5-final or at least 2.5.1. What follows is a list of the issues fixed in patch #1550273: 1) TestLoader.loadTestsFromName() failed to return a suite when resolving a name to a callable that returns a TestCase instance. 2) Fix a bug in both TestSuite.addTest() and TestSuite.addTests() concerning a lack of input checking on the input test case(s)/suite(s). 3) Fix a bug in both TestLoader.loadTestsFromName() and TestLoader.loadTestsFromNames() that had ValueError being raised instead of TypeError. The problem occured when the given name resolved to a callable and the callable returned something of the wrong type. 4) When a name resolves to a method on a TestCase subclass, TestLoader.loadTestsFromName() did not return a suite as promised. 5) TestLoader.loadTestsFromName() would raise a ValueError (rather than a TypeError) if a name resolved to an invalid object. This has been fixed so that a TypeError is raised. 6) TestResult.shouldStop was being initialised to 0 in TestResult.__init__. Since this attribute is always used in a boolean context, it's better to use the False spelling. Thanks, Collin Winter
On Thursday 31 August 2006 22:52, Collin Winter wrote:
I've just uploaded a trio of unittest-related patches:
Thanks, Collin!
#1550272 (http://python.org/sf/1550272) is a test suite for the mission-critical parts of unittest.
#1550273 (http://python.org/sf/1550273) fixes 6 issues uncovered while writing the test suite. Several other items that I raised earlier (http://mail.python.org/pipermail/python-dev/2006-August/068378.html) were judged to be either non-issues or behaviours that, while suboptimal, people have come to rely on.
I'm hesitant to commit even tests at this point (the release candidate has already been released, and there's no plan for a second). I've not reviewed the patches.
#1550263 (http://python.org/sf/1550263) follows up on an earlier patch I submitted for unittest's docs. This new patch corrects and clarifies numerous sections of the module's documentation.
Anthony did approve documentation changes for 2.5, so I've committed this for 2.5 and on the trunk (2.6). These should be considered for 2.4.4 as well. (The other two may be appropriate as well.) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org>
At this point, I'd say the documentation patches should go in - the other patches are probably appropriate for 2.5.1. I only want to accept critical patches between now and 2.5 final. Thanks for the patches (and particularly for the unittest! woooooo!) Anthony
participants (3)
-
Anthony Baxter
-
Collin Winter
-
Fred L. Drake, Jr.