Re: [Pyunit-interest] Modifications to PyUnit
Brought to you by:
purcell
From: Nathan H. <na...@he...> - 2000-06-04 15:49:53
|
Stephen Purcell wrote: > > [backticks etc.] > > This is probably not the simplest way to do things. Looks like some > smart combination of __import__ and the 'imp' and 'rexec' modules is the > simplest* solution, but hardly the most obvious. I think in these terms of simplicity that running the actual test in a new process is simpler. The logic is very easy - get the test name, pipe it to a new copy of yourself. parsing the results is as easy as a while loop that continuously reads for new output. > * Note: simplicity is here measured in lines of code and maintainability The only other solution I can think of is reloading every module in sys.modules. The GUI could keep a list of which it was using, and reload all the others. As for chaining errors I think this could be solved by reloading the set of modules twice. > The CGI test runner idea is a cool one. Talk about a cross-platform GUI! Indeed. The disadvantage is that it is hard to make the results realtime. Most tests take only seconds to run. However a large project that has thousands of tests and takes minutes to run would not get any feedback from the cgi until all the tests have been run, even if the first failed. Of course there is the option of a server side push or even a reload/refresh, both of which I'm quite familiar with. -- Nathan Heagy ------------ Blow Your Beef Away http://cowcomics.com |