Exemple #1
0
 def test_RecipeTaskPreProcess(self):
     """ Test RecipeTaskPreProcess event class """
     callback = lambda a: 2 * a
     tasklist = [("foobar", callback)]
     event = bb.event.RecipeTaskPreProcess(callback, tasklist)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.tasklist, tasklist)
     self.assertEqual(event.pid, EventClassesTest._worker_pid)
Exemple #2
0
 def test_RecipeTaskPreProcess(self):
     """ Test RecipeTaskPreProcess event class """
     callback = lambda a: 2 * a
     tasklist = [("foobar", callback)]
     event = bb.event.RecipeTaskPreProcess(callback, tasklist)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.tasklist, tasklist)
     self.assertEqual(event.pid, EventClassesTest._worker_pid)
Exemple #3
0
 def test_RecipeParsed(self):
     """ Test RecipeParsed event base class """
     callback = lambda a: 2 * a
     event = bb.event.RecipeParsed(callback)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.pid, EventClassesTest._worker_pid)
Exemple #4
0
 def test_RecipePreFinalise(self):
     """ Test RecipePreFinalise event class """
     callback = lambda a: 2 * a
     event = bb.event.RecipePreFinalise(callback)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.pid, EventClassesTest._worker_pid)
Exemple #5
0
 def test_RecipeParsed(self):
     """ Test RecipeParsed event base class """
     callback = lambda a: 2 * a
     event = bb.event.RecipeParsed(callback)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.pid, EventClassesTest._worker_pid)
Exemple #6
0
 def test_RecipePreFinalise(self):
     """ Test RecipePreFinalise event class """
     callback = lambda a: 2 * a
     event = bb.event.RecipePreFinalise(callback)
     self.assertEqual(event.fn(1), callback(1))
     self.assertEqual(event.pid, EventClassesTest._worker_pid)