python web2py.py --help

  -S APPNAME, --shell=APPNAME
                        run web2py in interactive shell or IPython (if
                        installed) with specified appname
  -T TEST_PATH, --test=TEST_PATH
                        run doctests in web2py environment; TEST_PATH like
                        a/c/f (c,f optiona
  -R PYTHON_FILE, --run=PYTHON_FILE
                        run PYTHON_FILE in web2py environment; should be used
                        with --shell o
  -M, --import_models   auto import model files; default is False; should be
                        used with --shell option


python web2py.py -T <yourapp>/<controller>/<function>

It executes all doctests in environment. Have a look at sql.py for
example doctesting with a database (using a sqlite database)

And if you want to use unittest

python web2py.py -S <yourapp> -M -R
/path/to/web2py/applications/yourapp/tests/testControllerA.py

Will execute the file inside of the web2py environment (with access to
database models as denoted by the -M option)'

Now since we had such a difficult time finding these options, please
list links as to where the documentation on this subject can be
updated and explained further.



-Thadeus





On Mon, Feb 22, 2010 at 5:21 PM, spiffytech <[email protected]> wrote:
> nside to doctests is they are harder to organize; you can't
> cleanly separate different sorts of tests that all relate to the same
> function (i.e., when a function is very sensitive to initial
> conditions). With external unit tests each logically distinct test can
> be represented with a distinct function, and that test can be run on
> it's own, without the overhead of any other tests (unlike doctests,
> where everything that tests a function must be run in order to test
> the part you're interes

-- 
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