On Wed, Feb 10, 2010 at 6:11 AM, Michael Foord <fuzzy...@voidspace.org.uk> wrote: > On 10/02/2010 01:07, Ben Finney wrote: >> Michael Foord<fuzzy...@voidspace.org.uk> 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 come up with: a different implementation for >>>> generating a short description. >>>> >>> >>> 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). >>> >> >> What you describe (adding the class and method name when reporting >> the test) sounds like it belongs in the TestRunner, since it's more a >> case of “give me more information about the test result”. > > The code for giving information about individual test results is the > TestResult. The TestRunner knows nothing about each individual result (or > even about each individual test as it happens). The TestRunner is > responsible for the whole test run, the TestCase runs individual tests and > the TestResult reports (or holds) individual test results (at the behest of > the TestCase). > > Given this structure it is not possible for test descriptions to be the > responsibility of the TestRunner and I don't feel like re-structuring > unittest today. :-) >
FWIW +1 -- Regards, Olemis. Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: Nabble - Trac Users - Embedding pages? - http://feedproxy.google.com/~r/TracGViz-full/~3/MWT7MJBi08w/Embedding-pages--td27358804.html _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com