|
From: Leonardo R. A. <le...@hi...> - 2002-01-11 19:26:28
|
Hi, On Fri, 2002-01-11 at 16:17, Lalo Martins wrote: > On Fri, Jan 11, 2002 at 04:29:34PM +0200, Albertas Agejevas wrote: > > Hey, > > > > Admit it: the default TestRunner is dull. It's inconvenient as well > > if you want to see what actually failed. > > Yes. We planned to design a better interface sometime. The current design was a proof of concept so that we knew we had all the data we needed for a test report. Other interfaces would be a matter of replacing the dtml. Actually I thought about parameterizing which dtml was used so that we could have skins and stuff > > Attached is a patch adding funcionality of unittest.TextTestRunner's > > verbosity=2. It makes TestRunner recognize a "verbosity" property, > > and if it equals 2, give nice colourised output with test cases' > > docstrings, OK/FAIL/ERROR results and full backtraces. Makes running > > unit tests a joy! > > Sounds nice. Indeed. > > However, Leo's design was that TestRunner would acquire an > interface from the ZODB in good Zope tradition. Was it? gosh, I need to read that code again... :-) Anyway, the big picture I had involved having the test data collection and the display be completely independent. You should be able to select the template to view the test run under and then, when viewing the test report later on, you could choose different templates. > Do you disagree > to this approach? > > In case you agree, we may find the correct API for that and > adapt your patch. > > Otherwise, perhaps you could add the verbosity variable to the > default list of properties. > > Even better would be to add a "selection" property with more > descriptive names. I think that, instead of a verbosity parameter, we could have a template prefix parameter and then we'd try to acquire the methods for the template with that prefix, or we could go ZPT and ask for a ZPTemplate path from which we would fish out METAL macros. Don't know if we could stream those with RESPONSE.write() thought... > Anyway, I'll examine your patch in the next few days, if Leo > doesn't do it first. I'll take a look at it also > > As neither of us is devoting too much time to ZUnit right now > (for reasons of job priorities mostly), perhaps you'd like to > have CVS write access? In good Wiki tradition, CVS is a > wonderful thing because if we don't like your patch, we can > revoke it ;-) Agreed. -- Ideas don't stay in some minds very long because they don't like solitary confinement. |