def _run_test(self, test, process_result, queue): try: try: test.run(process_result) except Exception: # The run logic itself failed case = testtools.ErrorHolder("broken-runner", error=sys.exc_info()) case.run(process_result) finally: queue.put(test)
def _run_test(self, test, process_result, route_code): process_result.startTestRun() try: try: test.run(process_result) except Exception as e: # The run logic itself failed. case = testtools.ErrorHolder("broken-runner-'%s'" % (route_code, ), error=sys.exc_info()) case.run(process_result) finally: process_result.stopTestRun()
def _run_test(self, test, process_result, testqueue): """Support running a single test concurrently NOTE: This is a slightly modified version of the testtools.ConcurrentTestSuite._run_test() method. It was changed to support running a limited number of calling the functions setUpModuleConcurrent() and tearDownModuleConcurrent() """ try: try: setUpModuleConcurrent(test) test_engine_globals.TESTRUN_TESTRUNNINGFLAG = True test.run(process_result) tearDownModuleConcurrent(test) except Exception: # The run logic itself failed. case = testtools.ErrorHolder("broken-runner", error=sys.exc_info()) case.run(process_result) finally: testqueue.put(test)