def mock_get_handlers(): transaction_handlers = thread.get_from_thread_store( 'transaction_handlers') if not transaction_handlers: transaction_handlers = {'enter': [], 'exit': []} length = "%s/%s" % (len(transaction_handlers['enter']), len(transaction_handlers['exit'])) log_line("get: {pid: %s, idx: %s, iteration: %s, len: %s}" % (os.getpid(), thread.get_index(), thread.get_iteration(), length)) return transaction_handlers
def mock_set_handlers(handlers): log_line("set: {pid: %s, idx: %s, iteration: %s, handlers: %s}," % (os.getpid(), thread.get_index(), thread.get_iteration(), handlers)) thread.put_into_thread_store(transaction_handlers=handlers)
def test_00(self): log_it("00", reader.get_vars()) if get_iteration() > 5: raise BaseException("!!!")
def setup(): # setup_module if get_iteration() > 6: # do one pass to set stop_cause once return reader.read_vars() #