I'd be interested in seeing this controller. Especially the part about running the unittests.
On Wednesday, 9 May 2012 00:19:07 UTC+3, howesc wrote: > > while i would not call anything i have great tests or a wonderful example > of testing, i have used doctests in controllers successfully. those are > nice as the web2py environment is auto-setup for you. > > i'm working on using the unittest module to test my modules - those don't > always need all the web2py stuff setup. > > i'm running mainly on GAE and have modified the magic tests links from the > admin interface that run doctests and unittests to launch them from a > controller on my GAE dev environment. i think i have posted that > controller before, but lemme know if you are interested in my re-posting it. > > On Tuesday, May 8, 2012 2:12:13 AM UTC-7, Kimmo wrote: >> >> I'm also trying to get unit tests working on web2py by following the >> slices, but so far I've not been able to make them run properly. I'd like >> to see some clear examples and maybe some real projects with unit tests on >> web2py, to see how it's done in practice. >> >> >> On Sunday, 6 May 2012 20:40:10 UTC+3, Rod Watkins wrote: >>> >>> Hi everyone, >>> >>> I am fairly new to web2py and python programming, but have had some >>> rather wonderful success in the month or so I've been learning it. >>> >>> I am now preparing to start a real project and want to have unit tests >>> as I go. I've read a bit (will be doing more) about python unit testing >>> (doctests, unittest, nose, coverage, selenium), but I want to get some >>> expert advise before I fully dive in, if I may. So a few questions: >>> >>> 1. Do you use unit tests? >>> 2. What tools do you use (doctests, unittest, nose, coverage, selenium, >>> mocker, or others)? >>> 3. Do you use any of the test runners from the community? ( >>> http://packages.python.org/web2py_utils/test_runner.html,<http://packages.python.org/web2py_utils/test_runner.html>http://www.web2pyslices.com/slices/take_slice/142,<http://www.web2pyslices.com/slices/take_slice/142>http://web2py.com/AlterEgo/default/show/260) >>> >>> Which, if any, would you suggest using? >>> >>> I'm mainly looking for some guidance about how to proceed, what to study >>> and the best manner you've found to do unit tests. For example, it is >>> worth doing anything more than doctests in controllers? If so, what beyond >>> them should I learn to use, etc. >>> >>> Thanks everyone. >>> Rod >>> >>>

