def test_FuncNoArgs(self): def func(): for i in xrange(1000): pass t = Task() t.func = func t.run()
def test_FuncArgs(self): def func(some_arg=0): for i in xrange(some_arg): pass t = Task() t.func = func t.args_in = {'some_arg': 1000} t.run()
def test_LoopSets(self): def func(): for i in xrange(1000): pass t = Task() t.func = func t.loop = True t.interval = 100000 t.run() self.assertTrue(t.next_run > time.time())