X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=t%2Fmoe%2Ftasktypes%2Fdummy.py;h=446c4e79a8377bcafb91b253322652d92e95fbb6;hb=5ad8b4f69ab4fdf4d75f5a56fc72ef2988f1da1f;hp=6262def76c004e4763d8ccf1957745f86be29334;hpb=5336c317adedb7fcc26aedd8c16940f2750ea8b3;p=eval.git diff --git a/t/moe/tasktypes/dummy.py b/t/moe/tasktypes/dummy.py index 6262def..446c4e7 100644 --- a/t/moe/tasktypes/dummy.py +++ b/t/moe/tasktypes/dummy.py @@ -8,28 +8,28 @@ Runs the test pipeline for each TEST def init(e): - def hook_m_50: - e.log.info('Here should be compiling') - - e.main_pipeline.insert(hook_m_50, 'dummy tasktype hook_m_50', 50) - - def hook_m_60: - e.log.info('Here should be test pipeline running') - tests = e['TESTS'].split() - for t in tests: - e.log.info('Running test %s' % t) - e.log.user.info('TEST %s ...' % t) + def hook_m_50(self): + e.log.info('Here should be compiling') - op = moe.config.Operation('SET', None, t, level=70, source='') - testvar = e.config.lookup('TEST') - # Add and remove operation setting 'TEST="..."' - testvar.add_operation(op) - e.test_pipeline.run() - testvar.remove_operation(op) - - e.main_pipeline.insert(hook_m_60, 'dummy tasktype hook_m_60', 60) - - def hook_t_30: - e.log.info("Maybe we should do something? Nah...") - - e.test_pipeline.insert(hook_t_30, 'dummy tasktype hook_t_30', 30) + e.main_pipe.insert(50, 'dummy tasktype hook_m_50', hook_m_50) + + def hook_m_60(self): + e.log.info('Here should be test pipeline running') + tests = e['TESTS'].split() + for t in tests: + e.log.info('Running test %s' % t) + e.log.user.info('TEST %s ...' % t) + + op = moe.config.Operation('SET', None, t, level=70, source='') + testvar = e.config.lookup('TEST') + # Add and remove operation setting 'TEST="..."' + testvar.add_operation(op) + e.test_pipeline.run() + testvar.remove_operation(op) + + e.main_pipe.insert(60, 'dummy tasktype hook_m_60', hook_m_60) + + def hook_t_30(self): + e.log.info("Maybe we should do something? Nah...") + + e.test_pipe.insert(30, 'dummy tasktype hook_t_30', hook_t_30)