X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=t%2Fmoe%2Fexts%2Fdummy.py;h=9e15aa312e9967ff56353424e6835120c06f168e;hb=420a49640eb8a89b578c390a939bc0ba818f9a7e;hp=7a070a25f52712c4df5aff8e04d907603c5feda5;hpb=5ad8b4f69ab4fdf4d75f5a56fc72ef2988f1da1f;p=moe.git diff --git a/t/moe/exts/dummy.py b/t/moe/exts/dummy.py index 7a070a2..9e15aa3 100644 --- a/t/moe/exts/dummy.py +++ b/t/moe/exts/dummy.py @@ -5,18 +5,23 @@ Debug dummy extension. Adds several info-printing hooks to both pipelines. """ +from moe.logs import log, userlog + def init(e): - def hook_m_0(self): - e.log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)') - e.main_pipe.insert(0, 'exts.dummy.hook_m_0', hook_m_0) + def hook_m_0(e): + log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)') + + e.main_pipe.insert(0, hook_m_0) - def hook_m_79(self): - e.log.info('Me, the dummy extension, requies no cleanup! (at time 79)') - e.main_pipe.insert(79, 'exts.dummy.hook_m_79', hook_m_79) + def hook_m_79(e): + log.info('Me, the dummy extension, requies no cleanup! (at time 79)') - def hook_t_42(self): + e.main_pipe.insert(790, 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(42, 'exts.dummy.hook_t_42', hook_t_42) + log.info(t) + userlog.info(t) + + e.test_pipe.insert(420, hook_t_42)