Are we looking at the same thing?

The link you provided gives an example of using the unittest classes
(not doctest), in which you can import anything you want since it is
just a python file.

In the example is an example of executing your controllers in a web2py
environment.

Also the doctest example
http://www.web2py.com/examples/default/examples#testing_examples
anything in the >>> is python code so you can import modules if you
want.

Also, the doctests have access to the web2py environment, so they have
access to db.

-Thadeus





On Mon, Feb 22, 2010 at 12:49 PM, Jon Romero <[email protected]> wrote:
> I've read about web2py and unit testing and I tried many things.
> These are my thoughts (please correct me If I am wrong)
>
> 1. web2py uses doctests. doctests must be inside the controller
> (increasing the noise) and are not flexible. Also, is not trivial to
> use them in another automated built/test system
> 2. The only official example online is here 
> http://www.web2py.com/AlterEgo/default/show/213
> where you
> cannot import models. I think that you have to load the environment
> first (any code snippet how to do that)?
>
> So, any decent solution that you guys know?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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.

Reply via email to