mirror of
git://git.yoctoproject.org/poky
synced 2026-08-11 20:00:33 +00:00
bitbake: tests/color: Fix event register to pass the datastore
Adding the "if d is None" to the event handling code meant some of these tests stopped working. The reason is that len(d) was zero but not equal to None. Passing the data object to the register() function in the test correctly registers the event handler and avoids the problem, it just happened to work previously, incorrectly. (Bitbake rev: 426eb83c6668d82a2ebaca6c672db131e37c11da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
22d7989e8f
commit
cca5433baf
@ -31,7 +31,7 @@ class ColorCodeTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.d = bb.data.init()
|
||||
self._progress_watcher = ProgressWatcher()
|
||||
bb.event.register("bb.build.TaskProgress", self._progress_watcher.handle_event)
|
||||
bb.event.register("bb.build.TaskProgress", self._progress_watcher.handle_event, data=self.d)
|
||||
|
||||
def tearDown(self):
|
||||
bb.event.remove("bb.build.TaskProgress", None)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user