X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=t%2Fmoe%2Fexts%2Fdummy.py;h=3ec5816565644b6a8f6c053f61875d5e58c93fa2;hb=878693c0f1a0a4cee1ae0478e762b4c57dc44df3;hp=a0e2dab0d4cf33fef786a84e3f50eec19ef00548;hpb=02d37df1d5fb4155409982e29b73eb4d4aefe398;p=moe.git diff --git a/t/moe/exts/dummy.py b/t/moe/exts/dummy.py index a0e2dab..3ec5816 100644 --- a/t/moe/exts/dummy.py +++ b/t/moe/exts/dummy.py @@ -7,16 +7,19 @@ Adds several info-printing hooks to both pipelines. def init(e): - def hook_m_0(self): + def hook_m_0(e): e.log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)') - e.main_pipe.insert(hook_m_0, 'exts.dummy.hook_m_0', 0) - def hook_m_79(self): + e.main_pipe.insert(0, 'exts.dummy.hook_m_0', hook_m_0) + + def hook_m_79(e): e.log.info('Me, the dummy extension, requies no cleanup! (at time 79)') - e.main_pipe.insert(hook_m_79, 'exts.dummy.hook_m_79', 79) - def hook_t_42(self): + e.main_pipe.insert(79, 'exts.dummy.hook_m_79', hook_m_79) + + def hook_t_42(e): t = 'It\'s test %s and the dummy extension did nothing! (at time 42)' % e['TEST'] e.log.info(t) e.log.user.info(t) - e.test_pipe.insert(hook_t_42, 'exts.dummy.hook_t_42', 42) + + e.test_pipe.insert(42, 'exts.dummy.hook_t_42', hook_t_42)