Re: [Pyunit-interest] ParallelTestSuite from 2001
Brought to you by:
purcell
From: Ori P. <or...@us...> - 2006-09-19 17:41:42
|
'--threads' with Testoob does that with unittest suites. http://testoob.sourceforge.net Jhon Honce wrote: > Has anyone updated this for the latest unittest? If I get it running, > I=92ll post. I=92m new to python and unittest so any help/ideas would b= e > appreciated. >=20 > --Jhon Honce >=20 >=20 > class ParallelTestSuite(unittest.TestSuite): > """Runs its tests in parallel threads""" > def __call__(self, testResult): > from threading import Thread > threads =3D [] > for test in self._tests: > result =3D test.defaultTestResult() > thread =3D Thread(target=3Dtest, args=3D(result,)) > threads.append((test, thread, result)) > thread.start() > for test, thread, result in threads: > thread.join() > testResult.startTest(test) > for error in result.errors: > apply(testResult.addError, error) > for failure in result.failures: > apply(testResult.addFailure, failure) > testResult.stopTest(test) >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=103432&bid#0486&dat=121642 > _______________________________________________ > Pyunit-interest mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyunit-interest >=20 |