Yes, you can using doctests
def index():
"""
This is a sample test:
>>> tmp=index()
>>> session.x
3
"""
session.x=3
return dict(message=T('Hello World'))
On Oct 17, 3:33 am, morningovermidnight <[EMAIL PROTECTED]>
wrote:
> I've been reading earlier posts on unittests and using doctests in
> web2py. I have tried and run some successful doctests in web2py.
> However, it seems that the doctest is testing the value that my
> function returns, as it should, but is there a way to write a test to
> check an intermediate value in my function, say the value of a session
> variable that is stored but not returned to the view?
>
> Also, just curious, what are some of the solutions people here in the
> group are using for testing and for debugging web2py applications?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---