def _run_tool(self, tool): with tool as t: if tool.wanna_reuse(self._reuse): tool.reuse() return elif tool.can_reuse: if settings.only_reload_results: monitor.reset() raise RuntimeError('End of reload results mode at: ', t) self._reuse = False t._reuse = self._reuse t.starting() try: t.run() except: etype, evalue, etb = sys.exc_info() msg = evalue.args[0] if evalue.args else '' if 'exception occured at path (class): ' not in str(msg): new_msg = '%s\nexception occured at path (class): %s (%s)' % ( evalue, analysis.cwd[:-1], t.__class__.__name__) evalue = etype(new_msg, *evalue.args[1:]) raise etype, evalue, etb t.finished() self._reuse = t._reuse
def tearDown(self): self.server = None mock.patch.stopall() monitor.reset()