I figured it out (stupid mistake on my part). Part of the instructions
at http://web2py.com/AlterEgo/default/show/260 include creating a test
database. I dutifully followed those instructions, but neglected to
change my DAL connection string to my actual database :P

A great thanks to the community and to you, Massimo, for taking so
much time and effort to answer these questions. It's very helpful.

And I also found out about web2py_utils!

On May 5, 6:24 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> OK. Thank you for the idea. You will be happy :)
>
> --
> Thadeus
>
> On Wed, May 5, 2010 at 2:00 PM, Jonathan Lundell <jlund...@pobox.com> wrote:
> > On May 5, 2010, at 9:13 AM, Thadeus Burgess wrote:
>
> >> It supports nosetests which includes a coverage plugin. I will look
> >> into adding the option stand-alone so you do not need nosetests.
>
> > Nosetests works for me just fine; in fact it's preferable.
>
> >> The problem is that there is no way to determine how much "coverage"
> >> you have in a web2py app. It will include the coverage of "gluon + all
> >> apps", which is not what you want I don't think. I have attempted and
> >> do not see any way around this, it is a limitation in web2py that will
> >> now allow for proper coverage testing.
>
> > In my current unit test, which calls coverage directly, I generate the 
> > report like this:
>
> > cov.report(file=open('coverage.report','w'), 
> > omit_prefixes=list(('gluon','/path/to/tests')))
>
> > That is, I exclude gluon and the unit test directory from the report, which 
> > seems to do the trick just fine. I'm pretty sure you can do the same thing 
> > via the nose plugin, but I haven't tried.
>
> >> The requirements for the script are:
>
> >> A) Source installation of web2py, given how it must execute and locate
> >> test files
> >> B) A runner script to actually start the tests. Since it relies on the
> >> path to [A]

Reply via email to