aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>2017-08-14 19:19:05 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-07 11:57:31 +0000
commitdaa59a2057c811b20d75235526ac6c2079ac6e10 (patch)
tree00a63dfa77956db65ac495c1b484583b538a82c5
parent4a19dde704fd0bf262ea991ef530f991a4897d31 (diff)
downloadbitbake-daa59a2057c811b20d75235526ac6c2079ac6e10.zip
bitbake-daa59a2057c811b20d75235526ac6c2079ac6e10.tar.gz
bitbake-daa59a2057c811b20d75235526ac6c2079ac6e10.tar.bz2
tests/event: Add test for bb.event.worker_fire
Test the triggering of bb.event.worker_fire callback. Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/tests/event.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/tests/event.py b/lib/bb/tests/event.py
index 1ddcb41..f11fda5 100644
--- a/lib/bb/tests/event.py
+++ b/lib/bb/tests/event.py
@@ -388,6 +388,14 @@ class EventHandlingTest(unittest.TestCase):
self.assertEqual(self._test_ui1.event.send.call_args_list,
expected)
+ def test_worker_fire(self):
+ """ Test the triggering of bb.event.worker_fire callback """
+ bb.event.worker_fire = Mock()
+ event = bb.event.Event()
+ bb.event.fire(event, None)
+ expected = [call(event, None)]
+ self.assertEqual(bb.event.worker_fire.call_args_list, expected)
+
def test_print_ui_queue(self):
""" Test print_ui_queue method """
event1 = bb.event.OperationStarted()