"Ian Wilson" <[EMAIL PROTECTED]> writes:

> Ha you guys are fast.
>
> In addition to what they said you probably want to focus on 4
> potential problems(4 tests).
>
> 1.  Make sure the widget's template compiles and you can import it..
> by trying to import it.
> from project.widgets import MyWidget
>
> 2. Make sure the widget instantiates.
> myWidget = MyWidget(**defaultParams)
>
> 3.  Make sure the wiget's template is correctly interpolating by calling 
> render.
> myWidgetOutput = myWidget.render(**params)
>
> 4.  Check that the output of the widget's render method is correct by
> checking string inclusion.
> assert someString in myWidgetOutput
>
> -Ian

I like testing with the toolbox as well.  This makes me write a description to
it, document every variable I use and I have a test case that can be used by
other people without they having to look at my source code. 

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to