[Web-SIG] Latest WSGI Draft
Phillip J. Eby
pje at telecommunity.com
Mon Aug 23 17:56:53 CEST 2004
At 01:59 AM 8/23/04 -0500, Ian Bicking wrote:
>Ian Bicking wrote:
>>>Fine. I just don't like it being anything other than a heuristic.
>>>Suppose I'm running acceptance tests? My CGI runner will say "you're
>>>being run only once", except then I'll run it again when the acceptance
>>>test tests another input. But, I want the acceptance test to test the
>>>operation of the application when it's in "cgi mode", effectively.
>>If you're running multiple unit tests in a single process, you aren't in
>>CGI mode, and you shouldn't set that key. You're in some other mode. If
>>CGI mode really matters, the only test that is accurate is one where you
>>are actually launching a separate process.
>Now that I think about it, maybe it does make sense for testing purposes
>that run_once doesn't mean that it's the last run -- it would be
>annoyingly slow to start a process for each test, and might make it hard
>to do real unit tests, but if you have a different code path when
>wsgi.run_once is true then it's important to test that. OTOH, if I'm
>testing a project, I can make sure that my code doesn't require the
>process to terminate; code and tests are hardly decoupled after all.
>Anyway, I guess I retract my concern over this issue.
So, leave 'wsgi.run_once' the way I last proposed it?
More information about the Web-SIG