diff options
author | Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> | 2017-08-14 19:19:05 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-07 12:14:34 +0000 |
commit | fda60b31ec4f8b14d72390ae1ca1e982ba4e31dc (patch) | |
tree | 0872dc1166bb2d5b251215c8441d8730dfea87a8 /bitbake | |
parent | 61f409baff6b42135331ffea88a3a4bbc3ea8e00 (diff) | |
download | poky-fda60b31ec4f8b14d72390ae1ca1e982ba4e31dc.tar.gz |
bitbake: tests/event: Add test for bb.event.worker_fire
Test the triggering of bb.event.worker_fire callback.
(Bitbake rev: daa59a2057c811b20d75235526ac6c2079ac6e10)
Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/tests/event.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/event.py b/bitbake/lib/bb/tests/event.py index 1ddcb411de..f11fda5064 100644 --- a/bitbake/lib/bb/tests/event.py +++ b/bitbake/lib/bb/tests/event.py | |||
@@ -388,6 +388,14 @@ class EventHandlingTest(unittest.TestCase): | |||
388 | self.assertEqual(self._test_ui1.event.send.call_args_list, | 388 | self.assertEqual(self._test_ui1.event.send.call_args_list, |
389 | expected) | 389 | expected) |
390 | 390 | ||
391 | def test_worker_fire(self): | ||
392 | """ Test the triggering of bb.event.worker_fire callback """ | ||
393 | bb.event.worker_fire = Mock() | ||
394 | event = bb.event.Event() | ||
395 | bb.event.fire(event, None) | ||
396 | expected = [call(event, None)] | ||
397 | self.assertEqual(bb.event.worker_fire.call_args_list, expected) | ||
398 | |||
391 | def test_print_ui_queue(self): | 399 | def test_print_ui_queue(self): |
392 | """ Test print_ui_queue method """ | 400 | """ Test print_ui_queue method """ |
393 | event1 = bb.event.OperationStarted() | 401 | event1 = bb.event.OperationStarted() |