Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Ben Finney
Michael Foord writes: > There is a newline between the testname and the first line of the > docstring. If there is no docstring behaviour is completely unchanged. […] > shortDescription itself is now unchanged from Python 2.6. Thanks, that completely addresses and satisfies my concerns about th

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Michael Foord
On 11/02/2010 22:03, Ben Finney wrote: Michael Foord writes: It is done. The slight disadvantage is that overriding shortDescription on your own TestCase no longer removes the test name from being added to the short description. That's a significant disadvantage; it can easily doubl

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Ben Finney
Michael Foord writes: > It is done. The slight disadvantage is that overriding > shortDescription on your own TestCase no longer removes the test name > from being added to the short description. That's a significant disadvantage; it can easily double the length of the reported description for a

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Michael Foord
On 11/02/2010 12:13, Nick Coghlan wrote: Michael Foord wrote: Given that the change broke something, and the desired effect can be gained with a different change, I don't really see a downside to the change I'm proposing (reverting shortDescription and moving the code that adds the test name

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Nick Coghlan
Michael Foord wrote: > Given that the change broke something, and the desired effect can be > gained with a different change, I don't really see a downside to the > change I'm proposing (reverting shortDescription and moving the code > that adds the test name to TestResult). +1 on fixing this in a

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-10 Thread Olemis Lang
On Wed, Feb 10, 2010 at 6:11 AM, Michael Foord wrote: > On 10/02/2010 01:07, Ben Finney wrote: >> Michael Foord  writes: >>> On 09/02/2010 21:50, Ben Finney wrote: I understood the point of ‘TestCase.shortDescription’, and indeed the point of that particular name, was to be clear th

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-10 Thread Michael Foord
On 10/02/2010 01:07, Ben Finney wrote: Michael Foord writes: On 09/02/2010 21:50, Ben Finney wrote: I understood the point of ‘TestCase.shortDescription’, and indeed the point of that particular name, was to be clear that some *other* text could be the short description for the test

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Ben Finney
Michael Foord writes: > On 09/02/2010 21:50, Ben Finney wrote: > > I understood the point of ‘TestCase.shortDescription’, and indeed > > the point of that particular name, was to be clear that some *other* > > text could be the short description for the test case. Indeed, this > > is what you've

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
On 09/02/2010 21:50, Ben Finney wrote: Michael Foord writes: It seems to me that the same effect (always reporting test name) can be achieved in _TextTestResult.getDescription(). I propose to revert the change to TestCase.shortDescription() (which has both a horrible name and a horrible im

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
On 09/02/2010 22:22, Olemis Lang wrote: On Tue, Feb 9, 2010 at 4:50 PM, Ben Finney wrote: Michael Foord writes: It seems to me that the same effect (always reporting test name) can be achieved in _TextTestResult.getDescription(). I propose to revert the change to TestCase.shortDesc

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Olemis Lang
On Tue, Feb 9, 2010 at 4:50 PM, Ben Finney wrote: > Michael Foord writes: > >> It seems to me that the same effect (always reporting test name) can >> be achieved in _TextTestResult.getDescription(). I propose to revert >> the change to TestCase.shortDescription() (which has both a horrible >> na

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Ben Finney
Michael Foord writes: > It seems to me that the same effect (always reporting test name) can > be achieved in _TextTestResult.getDescription(). I propose to revert > the change to TestCase.shortDescription() (which has both a horrible > name and a horrible implementation and should probably be re

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
I missed another minor issue. In the interests of completeness... You currently have to subclass TextTestRunner (and override _makeResult) for it to use a custom TestResult. Implementing a custom test result is one of extensibility points of unittest, so I propose adding an optional argument t

[Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
Hello all, I've been looking at outstanding unittest issues as part of my preparation for my PyCon talk. There are a couple of changes (minor) I'd like to make that I thought I ought to run past Python-Dev first. If I don't get any responses then I'll just do it, so you have been warned. :-)